PHP2Shell: CVE-2026-109618/109619 Patch and Triage Guide
A pre-disclosure exploit, a leaked embargo and no complete mitigation: how to triage PHP2Shell across FPM, mod_php and the PHP copies you forgot you were running.

PHP2Shell is two remote code execution vulnerabilities, CVE-2026-109618 and CVE-2026-109619, in PHP versions 5.4 through 8.5. That covers roughly every PHP release since 2012. According to the Wikipedia summary of the incident, they were announced publicly on 20 October 2026. Patched builds for 8.2, 8.3, 8.4 and 8.5 followed the next day, along with details of the bugs.
Patching alone is not the hard part. The fixes leaked before the embargo ended, and exploitation was seen in the wild before most teams had a binary to install. The upstream advisory also says plainly that no temporary mitigation is complete. Upgrading is the only fix. If you run PHP serving web requests, you have to answer three questions: are you exposed, how fast can you get to a patched build, and do you need to assume compromise in the meantime.
What PHP2Shell actually is
The pair carries two separate CVE identifiers but is usually discussed as one incident. PHP's own developers rated it 9.2, critical, under CVSS v4.0. The security firm watchTowr scored it a full 10.0. Published reports say very little about the mechanics. They note that memory-safety concerns in this area had been raised long before, and that an out-of-memory error behind one of the two bugs was spotted earlier. Treat any write-up claiming to know the exact trigger with some caution unless it links to the advisories.
The scale comes from PHP's footprint. Around 69% of websites use PHP, including those built on Drupal, Joomla and WordPress. PHP also ships inside places teams forget to inventory:
- vendor appliances
- hosting control panels such as cPanel and Plesk
- some Windows applications
A host with no PHP project in its repository can still be exposed through one of these.
How it was found, and why it sat unfixed
Two parties found the bugs independently. The first was Ryan Austin, a researcher at the security firm Calif, working in August 2026 as part of OpenAI's 'Patch the Planet' project. He used OpenAI's GPT-5.6 Sol model to help find the vulnerability. The second was Wiz, the cloud security company now part of Google Cloud. Its researchers used Gemini 4 Argon, GPT-5.6 Sol and their own tool, Wiz Atlas.
The more uncomfortable detail is that part of this was already known. A PHP core developer found the out-of-memory error behind one of the vulnerabilities during a 2024 audit. It was never fixed. The team could not agree on how to fix it, and nobody had shown a working exploit, so it was not prioritised. The broader memory-safety concerns had also been dismissed earlier because a practical exploit was not thought feasible.
The lesson here does not depend on any AI framing. A bug with no known exploit is a bug whose exploit has not been written yet. 'We could not agree on the fix' is a decision with a cost, and in this case it was paid later by everyone running PHP.
A disclosure that leaked before the patch
The plan was a coordinated release. It did not hold. On 20 October, news of the vulnerabilities surfaced in three places:
- on Hacker News
- in a post on X by watchTowr Labs
- in a proof-of-concept exploit video that Calif released by mistake
PHP's maintainers responded by publishing an early notice on PHP.net, telling users to prepare and update the moment the patch landed. Sansec predicted 'mass attacks to start within 15 minutes of the release'.
The embargo then broke a second way. Chainguard shipped patched versions early. That let attackers diff the changed code, and proof-of-concept exploits, write-ups and partial mitigations were circulating before the embargo ended. Both GitHub security advisories went live on 21 October at 13:34 UTC, 26 minutes ahead of the announced release time, and the PHP site was updated shortly after.
The exploitation timeline shows that disclosure timing did not decide exposure:
- Amazon Threat Intelligence found a PHP2Shell exploitation attempt in its MadPot telemetry dated 17 October, four days before public disclosure.
- Cloudflare reported signs of exploitation before the patch was public and deployed temporary WAF rules.
- watchTowr said its honeypots showed in-the-wild exploitation by 21 October.
- CISA said that same day it had not observed exploitation.
Those last two reports conflict. Plan around the worse one.
Working out whether you are affected
The most-cited Stack Overflow answer quotes php.net's advisory on who is at risk. The list is all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The advisory considers mod_php the highest risk. There is a demonstrated exploit in which an unauthenticated request triggers the attack before any application code runs. That means your framework's input validation, authentication middleware and routing never get a chance to intervene.
The baseline check is php -v in a shell. Be careful what that tells you. The CLI binary on your PATH is not necessarily the one Apache or FPM loads. Hosts with several PHP versions installed side by side are common. Check the version of the runtime that actually serves requests, not just the one your terminal finds first.
For deployments you cannot reach directly, the answer points to approaches for fingerprinting the PHP version on a remote domain. Treat that as a triage aid, not proof. If you have any public-facing PHP component and cannot confirm a patched version, the answer's advice is to assume you are affected.
Patched versions and the end-of-life problem
The fixed releases for supported branches are listed below.
| Branch | Affected | Patched |
|---|---|---|
| 8.2 | below 8.2.35 | 8.2.35 |
| 8.3 | below 8.3.36 | 8.3.36 |
| 8.4 | below 8.4.27 | 8.4.27 |
| 8.5 | below 8.5.12 | 8.5.12 |
Branches 7.4, 8.0 and 8.1 received source-code patches only. They are end of life, so there are no official updated binaries. If you are on one of those versions, you have three options:
- build PHP yourself with the patch applied
- rely on your distribution or vendor to ship a patched build
- migrate to a supported branch under pressure
None of these is quick on a legacy codebase. The affected range starts at 5.4, and published reports describe no patch at all for 5.x through 7.3. Teams still running those versions should plan to isolate or retire them rather than wait for a fix.
If your PHP comes from an OS package, the version string may not match upstream numbering exactly. Check your vendor's advisory to confirm the fix is included, rather than comparing version numbers to the table above.
Mitigation versus going offline
Temporary mitigations were published, but the maintainers were explicit that none of them is complete. Cloudflare's WAF rules were described as an attempted stopgap, and that is the right way to think about any edge filtering. The mod_php exploit fires before application code runs. Even so, a filter only blocks the request shapes someone has already seen. Variants built from the diffed patch may not match.
That is why official guidance went further than usual:
- The NSA recommended taking sites offline if they could not be updated immediately.
- CERT-EU and the UK NCSC gave advice that led many European organisations to pull sites while patches were pending. Examples include the Dutch government portal Overheid.nl, Denmark's national school communication platform, all public-facing Finnish government web services, and every French Interior Ministry website.
- Some Canadian government sites came down on the advice of the Canadian Centre for Cyber Security.
- Japan's National Cybersecurity Office and Singapore's Cyber Security Agency urged immediate updates.
The private sector made the same call. The Wikimedia Foundation shut down many supporting services, and 4chan and Something Awful went offline. In Japan, several games went down, including Umamusume: Pretty Derby, Granblue Fantasy and Princess Connect! Re:Dive, along with numerous e-commerce sites. The Internet Archive briefly shut down to fix the issue. Downtime has a cost, but each of these organisations judged it smaller than running an unauthenticated RCE exposed to the internet.
What the incident says about AI-assisted discovery
Wiz researchers compared PHP2Shell to Heartbleed, the 2014 OpenSSL bug in a library then used by about two-thirds of the web. The comparison holds up on reach: a single runtime sitting underneath a large share of the internet.
The difference is how it was found. Both independent discoveries used large language models as part of the workflow. A bug that had been known in part since 2024, and dismissed as impractical to exploit, became exploitable once researchers had better tools. Commentary in The Guardian pointed out the imbalance. The PHP Foundation has 13 full- and part-time staff and depends on donations, while the AI research credited with finding the bug attracts billions in investment.
For anyone running open-source runtimes in production, the practical point is that the time between 'theoretically worrying' and 'weaponised' is shrinking. Bugs your upstream has parked are fair game for anyone with the same tools.
Where this guidance does not fit, and what to watch
Upgrading closes the hole, but it does not undo anything that happened before you upgraded. The first exploitation attempt on record predates disclosure by four days, and public exploits circulated before the patches were official. Any host that was exposed during that window should be treated as possibly compromised. The NCSC specifically warned organisations to look for backdoors. Check for:
- web-writable directories containing unexpected PHP files
- new cron entries
- unfamiliar SSH keys
- outbound connections that started around mid-October
The version table also does not reach the PHP you did not install yourself. Copies inside cPanel, Plesk, vendor appliances and Windows applications update on the vendor's schedule, not yours. An inventory built from your own repositories will miss them.
Finally, published reports leave several things unclear. They do not establish how, or whether, the bugs reach non-web entry points such as CLI workers. They do not say anything about patches for versions older than 7.4. Do not fill those gaps with assumptions. Follow the two GitHub advisories and php.net directly, and update your assessment as they change.
This article draws on How can I know if my application is affected by the "PHP2Shell" vulnerabilities CVE-2026-109618 / CVE-2026-109619 and how can I mitigate the and an answer to it, on the Stack Exchange network, licensed under CC BY-SA 4.0.
- #CVE-2026-109618
- #CVE-2026-109619
- #PHP security patch
- #PHP-FPM
- #PHP2Shell
- #mod_php vulnerability


Comments