On 21 October 2026 the PHP project shipped emergency releases for every supported branch — 8.5.12, 8.4.27, 8.3.36 and 8.2.35 — closing two critical, unauthenticated remote-code-execution holes in the core engine (CVE-2026-109618 and CVE-2026-109619, CVSS 9.2). The bugs sit in the memory manager and the error handler: code nearly every PHP request touches. Here is what they are, why the fix took two years, how later versions of the language closed them, and how to prove your installation is patched.
On 21 October 2026 the PHP project released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 — emergency security releases that fix two critical vulnerabilities in the interpreter core. Both allow an unauthenticated attacker to execute arbitrary code on servers running PHP, rated 9.2 on the CVSS v4.0 scale. This is the PHP2Shell story: the bugs, the two-year stall, the leak that broke the embargo, and exactly how later versions of the language fixed it.
CVE-2026-109618 — RCE via out-of-memory corruption. If a request hits PHP's memory_limit at exactly the wrong moment, the engine can leave partially initialised internal data behind and later treat it as valid, corrupting memory. On Apache with mod_php an unauthenticated request can trigger the corruption before any application code runs — full remote code execution was demonstrated with default settings. The same root cause also yields RCE through PHP-FPM via application-level code paths.
CVE-2026-109619 — RCE via stale global state. A fatal error at the wrong point can leave internal state pointing at memory that belonged to a previous request. A later request handled by the same worker then dereferences freed memory — a classic use-after-free, confirmed up to worker crashes and demonstrated against a real-world application as full RCE.
Neither bug is an exotic edge case. They live in the two subsystems every request passes through — memory management and error handling — which is exactly why they are dangerous and why fixing them without breaking compatibility, hurting performance, or forcing changes across the third-party extension ecosystem was so hard.
The OOM root cause behind CVE-2026-109618 was first glimpsed in 2024 during PHP's first external security audit in years (Quarkslab, via OSTIF, funded by the PHP Foundation with Sovereign Tech Agency money). A potential exploit was theorised, but no concrete vector was found, and the PHP security team — operating on consensus with a handful of engineers holding the necessary deep engine knowledge — stalled. Several competing fixes existed; each had trade-offs; the team could not choose. The fix was restarted and abandoned repeatedly over two years. The foundation's own post-mortem calls it plainly: "the delay was a structural failure, caused by both the security team's decision process and its lack of resources."
Then the exploit work landed. On 11 August 2026 researcher Ryan A of security firm Calif — auditing PHP under OpenAI's Patch the Planet programme — reported an unconditional remote code execution sharing the 2024 root cause. OpenAI independently reported the same root cause, added further attack vectors on 18 September, and Wiz weighed in on 24 August. From August, fixing it became the top priority for the entire PHP Foundation security team — through weekends and around the clock.
The fix shipped simultaneously across every supported branch, because the vulnerability spanned all of them:
For organisations still on long-dead branches, PHP now publishes minimal source backports for PHP 7.4, 8.0 and 8.1 for those building from source or using an LTS vendor. Some LTS vendors backported the fix into their own patched builds without changing the version number — so a version string alone is not proof.
Verification: on a system you control, the fixed releases report:
$ php -v PHP 8.5.12 (cli) (built: Oct 21 2026) ... $ php -r 'echo PHP_VERSION, PHP_EOL;' 8.5.12
If you run a package manager, apply the vendor's updated packages; the fixed version floor is 8.5.12 / 8.4.27 / 8.3.36 / 8.2.35. The University of Washington, which was hit early by the scramble, is already isolating unpatched systems by null-routing them from the network until verified patched.
Coordinated disclosure held until two days before release. On 20 October ~15:00 UTC the two CVE identifiers began circulating on forums and social media — with a wrong release time and a wrong CVSS of 10.0 (the actual score is 9.2). No technical details leaked in that first wave. PHP pulled its pre-announcement forward to 19:30 UTC and moved the release from 22 October to 21 October 14:00 UTC — the tightest compromise that still let distributors package the fix. A firm involved in the disclosure, Calif, then mistakenly published a proof-of-concept video that was deleted but copied and circulated; it accelerated third-party PoC development. And at 07:41 UTC on release day, Chainguard unilaterally broke the embargo by publishing prebuilt fixed images — six hours before the coordinated release, letting anyone study the fix in binary form while the rest of the world waited.
The PHP2Shell episode is a case study in the site's three favourite categories at once:
If you run PHP and have not updated, the vulnerability is the recent, urgent one: 8.5.12, 8.4.27, 8.3.36 or 8.2.35, today, before the PoCs that are already circulating reach your logs.