What Is the PHP2Shell Vulnerability and Why Does It Matter Right Now?
The PHP2Shell vulnerability is a pair of critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, that let an unauthenticated attacker run code on a web server. Amazon saw attack attempts on October 17, four days before PHP released fixes on October 21, and CISA confirmed real exploitation on October 26. Patch and verify every PHP server you own.
Why Does PHP2Shell Matter Beyond One Patch Cycle?
Most teams treat a critical PHP advisory as a ticket to close. PHP2Shell shows why that habit is risky. The attack window opened before the fix existed, so the patch could not be the first line of defense. What protected organizations was knowing which servers they ran, which PHP build each one used, and whether anyone could reach it from the internet.
That is the same gap our own data keeps finding. In the 2026 Mid Year Threat Pattern Report we found that eight of eleven zero days, 73 percent, were weaponized within 72 hours of disclosure (dataset covers January to August 2026). A team that patches on a monthly cycle is slower than the attackers by a wide margin.
Which Systems Does the PHP2Shell Vulnerability Expose?
The two bugs work as a pair. CVE-2026-109618 is an out of memory condition that corrupts data during request cleanup. CVE-2026-109619 lets a later request on the same worker reuse stale state left behind by an earlier one. Chained together, they give an attacker control of the worker process without logging in. PHP rated the flaw 9.2 on the CVSS v4.0 scale.
Apache with mod_php carries the highest risk, but PHP-FPM, php-cgi, FrankenPHP and LiteSpeed deployments are also affected. The Dutch National Cyber Security Center published a technical wiki on PHP2Shell with detection and mitigation guidance. Independent scans counted roughly 2.2 to 2.6 million internet facing PHP hosts, and more than half run versions that will never get an official fix.
How Did Attackers Get a Four Day Head Start?
The sequence matters more than any single date. A security firm found a version of the bug in August using an AI model, and a second research group reported it independently. By mid October, someone else was already trying to use it.
| Date (2026) | Event |
|---|---|
| August | First private discovery, then an independent report from a second team |
| October 17 | Amazon honeypots record a PHP2Shell attempt, four days before any fix |
| October 20 | Technical details leak publicly |
| October 21 | PHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35 |
| October 26 | CISA adds both CVEs to its Known Exploited Vulnerabilities catalog |
| October 29 | Federal agency deadline to remediate |
Amazon’s own report on the first attempt was covered in detail by BleepingComputer. The addition to the CISA Known Exploited Vulnerabilities catalog came five days after the patches, and the coverage of that confirmation is worth reading for the federal deadline.
One caution on the numbers. Amazon measured attempts against its honeypots. CISA measured confirmed exploitation. These are different measurements, and a headline that blends them overstates what is known.
Why Does a Patch Give Attackers a Map to the Bug?
Every security fix is also a description of the flaw. Once PHP published its source changes, anyone could compare the old and new code and see exactly where the memory handling was wrong. AI tools now shorten that comparison from days to hours. We saw the same pattern when we tested how quickly an AI generated PowerShell script could be turned into an Active Directory attack. The skill barrier keeps falling, and the time between a patch and a working exploit keeps shrinking.
Does a Public Proof of Concept Mean Your Servers Are Exploitable?
Not automatically, and that is where teams waste time. A proof of concept shows that a flaw is real. Whether it works against your server depends on the PHP build, the handler in use, the operating system and the memory protections around it. The honest answer comes from testing your own environment, not from reading a repository. Treat a public proof of concept as a deadline, and treat your own test results as the verdict.
Does Address Randomization Still Matter for PHP2Shell?
Address space layout randomization makes memory corruption harder to turn into reliable code execution, so it still raises the cost for an attacker. It is not a fix. Check that it is switched on across your Linux hosts, because a value of 2 means full randomization.
What Does PHP2Shell Attack Traffic Look Like in Your Logs?
Exploit attempts against memory bugs tend to crash workers before they succeed. Repeated worker crashes in Apache logs, especially clustered in a short time from the same source, deserve a look. Researchers also reported a scanner user agent beginning with php2shell-scan. Search for both.
Crashes alone do not prove compromise, so pair them with web server access logs and any unexpected child processes spawned by the web user.
Which PHP Versions Contain the Fix?
The fixed releases are listed below. Check your build against the official PHP supported versions page, and read the vendor notes, such as the Sop-hos advisory and the Help Net Security patch summary.
| PHP branch | Fixed version | Status |
|---|---|---|
| 8.5 | 8.5.12 | Patched |
| 8.4 | 8.4.27 | Patched |
| 8.3 | 8.3.36 | Patched |
| 8.2 | 8.2.35 | Patched |
| 8.1 and older | None official | Minimal source backports published for 7.4, 8.0 and 8.1 |
Confirm what is really running, since a package can be updated while an old worker keeps serving traffic.
After patching, restart PHP workers or the web server so the new code is loaded. On Windows, rebuilt binaries were released October 26 for an unrelated Brotli flaw, CVE-2026-111497, so check that you are not mixing builds.
Why Do Forgotten and End of Life PHP Servers Matter Most?
The servers that get breached are rarely the ones on the patch dashboard. They are the old marketing site, the vendor portal nobody owns, the staging box that became permanent. Hundreds of thousands of internet facing hosts still run PHP 7.3 or older. For those, there is no vendor fix to wait for, so the choices are to upgrade, to isolate behind strict access controls, or to retire the system.
What Should You Do With Bugs You Once Called Too Hard to Exploit?
PHP2Shell was debated as hard to exploit, and attackers tried it anyway. Difficulty is a poor reason to delay. Even a flaw that sat undetected for decades, like the one we covered in our 25 year old curl vulnerability, is eventually found, and the finder is not always friendly.
We handle this with our Zero Day Priority Framework. A flaw that needs no authentication and sits on an internet facing system lands in Tier One, which means same day action. CVSS alone would not catch that, which is why the framework adds authentication requirements and exposure to the score.
Is a Patch or a WAF Rule Proof That the Risk Is Gone?
No. A patch proves a package changed. A web application firewall rule proves a pattern is blocked. Neither proves that every server was updated, that workers were restarted, or that the rule covers over sized or oddly encoded requests. Proof comes from testing: scan for the exposed version, confirm the fix is loaded, and try the attack path yourself under controlled conditions.
What Should Your Team Do Before the Next Critical Advisory?
Build the inventory first. List every system that runs PHP, who owns it and whether it faces the internet. Most teams find servers they forgot.
Set a patch clock. Decide now that internet facing, unauthenticated flaws get fixed within a day, so nobody debates it during an incident.
Verify, do not assume. Confirm versions and restarts on the host itself, and hunt through logs for activity from before the patch date.
Test from the attacker’s side. Our team runs penetration testing and vulnerability assessments that show which of your servers an attacker can actually reach, and our PTaaS platform keeps that testing continuous between audits.
Key Takeaways
- Attackers tried PHP2Shell four days before the patch existed, so patching alone is never the whole defense.
- Fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older have no official fix.
- Restart PHP workers after patching, or the old vulnerable code can keep running.
- Attempts and confirmed exploitation are different measurements. Read headlines with that in mind.
- Forgotten servers carry the most risk. Inventory first, then patch, then verify by testing.
Frequently Asked Questions About PHP2Shell
What is the PHP2Shell vulnerability?
PHP2Shell is the name for two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619. Together they let an unauthenticated attacker execute code on a server running an affected PHP build.
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 contain the fix. PHP 8.1 and older have no official release, though minimal source back ports were published for 7.4, 8.0 and 8.1.
Was PHP2Shell exploited before the patch?
Amazon recorded an attempt against its honeypots on October 17, four days before the October 21 fixes. CISA confirmed exploitation in the wild on October 26.
Is PHP2Shell on the CISA Known Exploited Vulnerabilities list?
Yes. CISA added both CVEs on October 26, 2026, with a federal remediation deadline of October 29.
Do I need to restart anything after updating PHP?
Yes. Restart PHP workers or the web server so the patched code is loaded. An updated package does not help while old workers still serve requests.
How can I check whether my servers are exposed?
Run php -v on each host, check package change logs for CVE-2026-109618, search logs for repeated worker crashes, and have an independent team test your internet facing systems.

