AI Found Two 9.2 Flaws Hiding in PHP for Two Decades — Patch Now, or Take the Site Offline
Patch, or go offline. Those were the official options.
That is not the language governments use for a routine software update. Yet on October 21, that was the advice, in almost those words, from the UK’s National Cyber Security Centre, the US National Security Agency, and CERT-EU, after the PHP project shipped emergency fixes for two critical vulnerabilities that allow an unauthenticated attacker — no login, no credentials, nothing — to run code on a web server.
The flaws are CVE-2026-109618, remote code execution via out-of-memory corruption, and CVE-2026-109619, remote code execution via stale global state. Both are rated CVSS v4.0 9.2. Together, researchers call the combined exploit PHP2Shell. PHP’s own advisory is blunt: all PHP installations serving web requests are at risk, there are no complete mitigations, and updating is the only safe choice.
If you run a website, this is probably your problem. PHP, created in 1994, sits underneath WordPress, Drupal, Joomla, Magento, MediaWiki and much of the custom web. Wiz puts PHP behind about 70% of websites; W3Techs at roughly three-quarters of sites whose language can be identified; BuiltWith counts about 24 million sites. The vulnerable code is not in a plugin or theme. It is in PHP itself — a perfectly maintained application can still be exposed through the runtime underneath it.
A bug old enough to have a career
The most unsettling detail is the age. Wiz says every PHP version released in the last decade is affected by at least one of the two flaws, going back to version 5.4. Calif, the security firm that found one of the flaws independently, says the earliest affected path it identified dates to PHP 5.4.0 — code from 2012. Other reporting traces affected releases back to PHP 5 in 2004.
This was not a bug nobody ever looked for. Calif’s account notes that Stefan Esser found the first PHP memory-limit remote vulnerability in 2004, that an out-of-memory issue was reported to the project in 2020, and that a 2024 audit by OSTIF and Quarkslab rediscovered the underlying issue without proving it could be exploited. The PHP Foundation, to its credit, did not hide from that history. Work on a fix stalled and restarted repeatedly, it wrote: “We won’t pretend otherwise: the delay was a structural failure.”
What changed was the tooling. Frontier AI models could do the slow, cross-referencing work — tracing how a fatal error in one request leaves corrupted state a later request can reuse — at a persistence human audits had not sustained. That cuts in both directions.
How the exploit works, in plain terms
Both flaws live in how PHP handles fatal errors, particularly running out of memory mid-request. When a request dies that way, cleanup can leave internal state partially initialised, freed but still referenced, or stale. A later request handled by the same worker process can then encounter that broken state.
Wiz’s technical disclosure breaks the pair into components: an upload-progress unserializer use-after-free and a process-memory disclosure under one CVE, and a fatal-error backtrace use-after-free plus an OPcache type confusion under the other. Chained together, an attacker first leaks worker-process memory — which can contain passwords, authentication tokens, API keys and certificates — learns where things live in memory, and then corrupts memory to execute code.
Wiz combined the flaws into a single script, php2shell, and demonstrated unauthenticated remote code execution against the latest container images of WordPress, Drupal and Joomla. Calif reported confirmed pre-authentication code execution against a longer list — WordPress, Drupal, Joomla, MediaWiki, Roundcube, Magento, phpMyAdmin, Nextcloud, Laravel, Symfony and WHMCS, among others. The risk is highest under Apache with mod_php, where a demonstrated exploit can be triggered by a request before any application code runs at all. PHP-FPM, php-cgi, FrankenPHP and LiteSpeed deployments are also in scope.
AI found it first — this time
The discovery credits read like a map of the new security industry. Calif identified a critical flaw using OpenAI’s GPT-5.6 Sol as part of OpenAI’s Patch the Planet initiative, beginning its audit on July 30 and reporting unconditional remote code execution in August. Wiz independently discovered and reported both vulnerabilities on August 24, using its own Wiz Atlas system alongside Gemini 4 Argon and GPT-5.6 Sol — the models helped find the bug, develop the exploit, detect attacks and validate the fix. OpenAI added further attack vectors in September. PHP’s maintainers led the fixes.
OpenAI calls the gap between AI finding a flaw and attackers finding it a “Defender’s Window,” and says that, to its knowledge, frontier AI found these vulnerabilities before attackers did. It backed that framing with money — $1 billion in subsidised Daybreak access for frontline defenders — and published a PHP version checker as a Codex skill. It also proposed a five-stage framework for exactly this situation: fix the upstream flaw, give affected organisations time to act, coordinate with governments, prepare updates across downstream products, and only then publish guidance.
Hold that claim at the right size. It is the participants’ account of their own timeline, and it is plausible — advance notice to Linux distributions and the pre-briefing of Google Cloud, Cloudflare, AWS, Microsoft, Automattic, Fastly and Akamai point to a genuinely organised effort. But the same models that shortened the defenders’ search shorten everyone else’s. Wiz noted AI substantially lowered the barrier to turning a decade-old bug into a working exploit. The window is real — and shrinking, because the tool that opens it is sold to anyone.
Then the embargo broke
Coordinated disclosure nearly fell apart in its final 48 hours. On October 20, the PHP Foundation reports, the two CVE IDs began circulating on forums and social media — with a wrong release time and an inflated CVSS of 10.0, though no technical details. PHP moved its pre-announcement forward and pulled the release from October 22 to October 21 at 14:00 UTC. That evening, Calif mistakenly published a video of its proof of concept working against several targets; copies fed accelerated exploit development the next day. Hours before release, Chainguard unilaterally broke the embargo and published built images containing the fix. Government sites were already going dark: Finland took public services offline, the Dutch NCSC pulled its own site along with the Port of Rotterdam, the national portal and several hospitals, France’s Interior Ministry put sites into preventive maintenance, Denmark shut down services, and Wikipedia took systems down until they could be patched.
When the agencies of at least five countries decide that being offline is safer than being unpatched, the severity debate is over. The remaining question is the long tail.
The long tail is the actual risk
The fixes shipped October 21 in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. On a supported branch, the path is clear and urgent. The problem is everyone else: patches cover 8.2 and newer, with only minimal source backports for 7.4, 8.0 and 8.1, while much of the WordPress estate still runs older PHP on hosting owners barely control. PHP 8.2 itself reaches end of life on December 31, 2026 — this is a forced migration, not just a patch.
Updating WordPress, Drupal or your framework does not fix this. Wordfence made the point explicitly for WordPress users: the exposure is in PHP, not the CMS. Patch the runtime, or the application updates are beside the point.
What to do today
- Find your PHP version, everywhere. Check production, staging, forgotten subdomains and that old marketing site nobody owns. If it serves web requests, it counts.
- Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35. If your host or platform has not shipped it, escalate today — and if you are on 7.4, 8.0 or 8.1, apply the backport and schedule the upgrade you have been deferring. There is no configuration change that substitutes for the patch; PHP lists interim settings that reduce exposure to specific paths, nothing more.
- If you genuinely cannot patch, reduce exposure or go offline. That is the agencies’ advice, not dramatisation: isolate internet-facing applications from public networks until the fix lands.
- Rotate what may have leaked. The exploit path includes disclosure of worker memory containing passwords, tokens, API keys and certificates. If a server was internet-facing and unpatched, treat its secrets as suspect, check logs for out-of-memory error patterns followed by unusual requests, and review for persistence.
- Ask your vendors the version question. Managed hosting, SaaS built on PHP, and inherited client sites all count. “Have you patched PHP for CVE-2026-109618 and CVE-2026-109619, and which version are you running now?” is a one-line email that should go out today.
The bottom line
PHP2Shell is the clearest case yet of the new vulnerability economy. A flaw sat in the world’s most common web language for over a decade, survived a professional audit, then fell quickly once frontier AI was pointed at it — by defenders who then watched their disclosure leak a day early. AI did not create this risk; it compressed every timeline — discovery, exploitation, disclosure, patching. The organisations that suffer will not be those with the worst code. They will be those with the slowest patch process. Patch today, then fix that process.