The PHP2Shell vulnerabilities are two of the most serious bugs of 2026. They can be used to exploit any website running PHP, independent of what framework or application is running. PHP is used by over half of the websites according to w3techs, thus making the potential impact of such a bug extremely high.
Leaked details
Information about PHP vulnerabilities was leaked on 20 October, while the coordinated disclosure was still underway. As a precaution many websites were taken offline while the fix was not yet public. According to the PHP project, they did not see any public functional exploits before releasing the fix publicly. However, Amazon reported that they did see exploitation attempts before the public release. We did not independently verify these claims.
Because of the leak the PHP project decided to release the fix one day early on 21 October. With the fix public, the work started on making sure the new versions were available via all channels. As PHP is often used as a lower layer of an application this often required several people to work together, as e.g. a Linux distribution might need to release a new package before a container can be rebuilt. Therefore, in some cases, it took many hours before each step in the chain was updated and the final website could be secured.
Likelihood of mass exploitation
When the day started on 21 October 2026, we read reports of PHP developers and cybersecurity specialists that all were referring to an impeding apocalypse. Indeed, our collective memories went back to the earlier, pre-LLM days, and we remembered a time when PHP was indeed rife with memory corruption vulnerabilties. That is to say, we didn’t shrug it off and considered it, based on the information at hand, a real possibility that a generic exploit was possible, especially considering the huge amount of security researchers with large LLM token budgets.
Later that day, more information surfaced, and while we still think the bug is serious and warranted the actions that were taken (e.g. taking websites offline), we currently do not think that a generic exploit is possible – the attacker needs more information from vulnerable systems, such as OS and PHP version, as well as potentially an ASLR leak or bypass. That is all to say, generic exploits for these bugs are very unlikely in our opinion. Nevertheless, patch affected systems as soon as possible.
We have indications that RCE is achievable under certain conditions, so while mass exploitation is unlikely in our opinion, targeted attacks will happen in the near future.
We have indications that RCE is achievable under certain conditions, so while mass exploitation is unlikely in our opinion, targeted attacks will happen in the near future. Nevertheless, patch affected systems as soon as possible.
Patching your systems
Please check the advisory by PHP. It specifically mentions: Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Check your PHP versions, as this vulnerability impacts a lot of sites, there is a high chance that you are (or were) affected. For sites running on your own servers you can check the php version using e.g. php -v or rendering a page with phpinfo(). Updates should be available from all major operating system vendors. For externally hosted websites you can contact the provider hosting the website, but most likely they have already updated or are busy updating. For SaaS platforms, the vendor is responsible for updating and most likely already has updated their infrastructure. The more difficult situation is when PHP is used in appliances. These usually don’t support security software like EDR and updates often take longer to be released. We therefore recommend limiting access to such appliances only to internal networks until the vendor has released an update.
The Dutch NCSC is keeping a list of applications using PHP on GitHub. This list give a nice overview of which software which might be vulnerable, although not complete and exhaustive..
Newly surfaced vulnerabilities, variants and patch bypasses
During the hours after the existence of a bug was leaked online, many vulnerability researchers tried to find the bugs and develop exploits for them. This lead to some researchers discovering other vulnerabilities in PHP. These vulnerabilities are real, however according to PHP developers the impact is low. These vulnerabilities were reported in private to the PHP project, so not all information is public. However given the information posted online, these bugs do indeed look relatively low impact compared to the PHP2Shell vulnerability.
The researcher(s) that found one of the new vulnerabilities claims that it works against PHP versions patched against php2shell (thus working as a bypass for the patched version 8.2.35) and it is a deserialization bug. The unserialize function used by PHP already contains a disclaimer that it’s unsafe to run with untrusted inputs. Therefore most PHP projects avoid using this function or contain safeguards that make exploitation difficult or impossible. Thus such a vulnerability would impact only a tiny fraction of all PHP websites, while the PHP2Shell vulnerability impacted all PHP websites in some form or another.
There is a post by Florian Roth that claims that a bug very similar to the original vulnerability is still exploitable. This is most likely referring to the issue posted on the PHP news on 23 October. It is in the same region of the codebase, but the impact is a lot lower. According to the PHP developers it requires an unusual combination configuration and application code. A mitigation for this issue is setting session.upload_progress.enabled=0 in php.ini.
There is a bug in the garbage collection of SimpleXMLElement objects. This is a memory corruption bug, but exploitation seems unlikely. A fix has already been merged by the PHP developers and will be included in the next release.
The research team at Eye Security will keep watching developments and update this page when more information is available.
Detecting exploitation
Exploitation attempts for PHP2Shell are easiest to detect in a web application firewall or IDS. The request themselves have attributes which are extremely uncommon in regular traffic. These are described below and indicate an attempt at exploitation. Just seeing this doesn’t show if the exploitation was successful.
- PHP_SESSION_UPLOAD_PROGRESS in a multi-part POST request
- PHPSESSID in a multi-part POST request
- PHP code “<?” opening tag in multi-part upload filename
- Abnormally long filename in multi-part file upload
- Multi-part post without a content-length (can be legitimate, but most browsers provide a content-length)
- Abnormally sized PHPSESSID cookies (normally 32 characters)
If you have to investigate a server for a possible compromise such logs might not be available, however the error logs can provide clues of attempted exploitation. These values provide a stronger case that the exploit was able to corrupt memory, however they don’t indicate whether the attacker was able to gain remote code execution.
- Failed to decode session object. Session has been destroyed
- “child pid N exit signal Aborted (6)”
- “child N exited on signal 6 (SIGABRT)”
- any log message indicating SIGABRT in a PHP process
- Coredump files in the appropriate directory for example /var/lib/systemd/coredump/ or /var/crash/
- Session files whose bodies start with “upload_progress_”
- Allowed memory size
- Session object destruction failed
The location of such logs depends on the webserver used and the way PHP is setup. Please check your vendors documentation for the right location.
As a final disclaimer, this post was NOT written using AI and contains our own opinions, beliefs and, potentially, genuine human mistakes.