On October 21, the PHP project released emergency patches for two unauthenticated remote code execution flaws: CVE-2026-109618 and CVE-2026-109619. Both carry a CVSS v4.0 score of 9.2. Within hours, government sites in the Netherlands, Finland and France were taken offline, Australia's cyber security agency confirmed its own site was affected, and companies across Japan began suspending services.
The patch is available. The hard part is everything after the download: finding every PHP runtime, restarting the right workers, and doing it before attackers finish reading the exploit code.
What the bug actually is
Both flaws sit in PHP's request lifecycle, below the application layer. That is why a well-written website, a hardened CMS and a WAF rule set do not fix this.
CVE-2026-109618 is an out-of-memory handling bug. When PHP interrupts a request during memory exhaustion, some internal request data is only partially initialized. The cleanup path then treats that invalid data as valid, corrupting memory in a way that can lead to code execution.
CVE-2026-109619 is a stale global state bug. Request-owned state can persist after its backing memory has been freed. When the same worker handles the next request, it may use that stale data before normal initialization resets it. That is a use-after-free pattern, and it can also lead to code execution.
PHP lists PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed as affected web-serving configurations. Apache mod_php is the highest-risk surface: PHP says it has demonstrated an unauthenticated request triggering the flaw before any application code runs. FPM and the others are still in scope; a missing public exploit for one configuration is not evidence of immunity.
The code runs with the permissions of the web worker account. That is not the same as root, but it is enough to read files, database credentials and API keys the worker can reach.
Why governments took sites offline
PHP is not a niche runtime. W3Techs puts it at roughly 70% of websites whose server-side language can be identified; Wiz uses the same figure. WordPress, Drupal, Joomla and Magento all run on it, and a long tail of shared hosting and internal tools does too.
That breadth changes the economics of patching. A single vulnerable PHP version can sit inside a container, a shared host, a vendor appliance or a forgotten internal app. Finding all of them takes longer than writing the patch.
So some organizations chose the blunt instrument. The Dutch cyber security agency took its own site offline as a precaution. Finland's state IT provider Valtori pulled government public network services. France's interior ministry temporarily took local government administrative sites offline. Australia's cyber.gov.au was among the affected government sites; GovCMS blocked direct access while serving cached pages, and Moodle took its site down before restoring it after patching.
In Japan, Prime Minister Sanae Takaichi urged organizations to install patches and said temporarily closing services can be a valid way to reduce risk. All Nippon Airways paused its website and app services, including Apple Wallet boarding passes; MUFG and Nomura suspended some non-core services; Asahi, Keihan, Sega and Bandai Namco also reported maintenance or suspensions, according to local media.
Troy Hunt, the Australian security researcher, put the trade-off plainly: "You have to patch it very, very quickly, or the suggestion is to take it offline."
The patch, and the versions that do not have one
The fixed releases are:
| Branch | Fixed version |
|---|---|
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
PHP 8.1 and older are end-of-life. The project published minimal source backports for 7.4, 8.0 and 8.1, but there are no official binary releases for those branches. Distributions and LTS vendors may have their own backports; check the changelog for both CVE identifiers, not just a version string. PHP 8.2 reaches end-of-life on December 31, 2026, so another migration is already due.
The patch itself was large. Firstpost reports it touched nearly 200 files and more than 10,000 lines of code. The release was originally planned for October 22, but details leaked on Hacker News on October 20, and the team moved the release to October 21 at 14:00 UTC.
If you cannot patch immediately
PHP's advisory is blunt: there is no complete mitigation, and upgrading is the only safe option. The temporary measures below reduce specific attack paths; they do not make an installation safe.
For the OOM flaw:
- Set
memory_limit=-1throughphp_admin_value, in a way the application cannot override. Confirm no pool, directory or.user.inirestores a finite limit. - Set
post_max_sizeto 8M for sites without uploads, or 32M for sites with uploads, and keepupload_max_filesizebelow it. - Enforce limits at the web server or proxy for decoded request size, field count, multipart parts, header count and nesting depth, including requests without a
Content-Length. - Use container or cgroup limits as a availability boundary, preferably killing only the affected worker. Do not use
RLIMIT_ASorRLIMIT_DATA, which can trigger the vulnerable allocation failure.
For the stale-state flaw:
- Set
session.upload_progress.enabled=0and restart all workers. It must take effect before request parsing;ini_set()and.user.iniare not enough. - On PHP 8.5, set
fatal_error_backtraces=0and restart. - Remove invalid or deprecated settings that emit diagnostics before initialization. Hiding errors with
error_reporting,display_errorsor@does not help. - Fix attacker-reachable fatal errors and execution timeouts, including callbacks, upload/import handlers and cleanup paths.
The second story: AI found it
The flaws had been in PHP for more than a decade. A developer noticed signs of the underlying problem in 2024, according to the PHP Foundation, but the work stalled amid technical complexity and limited resources.
In August 2026, Ryan Austin, a researcher at the security firm Calif, was auditing PHP source under OpenAI's "Patch the Planet" program. Using GPT-5.6 Sol, he turned a theoretical memory-safety issue into a working exploitation chain. Around the same time, Wiz researchers independently found the flaws using Wiz Atlas, Gemini 4 Argon and GPT-5.6 Sol. Wiz says one researcher did in a week what would previously have taken a world-class team months.
OpenAI calls the gap between discovery and exploitation the "Defender's Window": frontier AI found the bug before attackers did, giving maintainers and defenders time to patch. That is a real benefit, but it is also a warning. The same models can help attackers once the details are public. The PHP Foundation says humans remained responsible for the decisions and the fixes; AI helped assess reports and accelerate the work.
Node.js is a separate patch
Node.js also released security updates on October 21, but this is not the PHP2Shell bug. The project fixed 10 vulnerabilities across the 26.x, 24.x and 22.x lines, with a highest severity of High.
The most serious is CVE-2026-111497, an out-of-bounds write in the Brotli decoder that can lead to remote code execution. The fixed versions are Node.js 26.12.1, 24.22.1 and 22.23.4. Exploitation requires the application to pass attacker-controlled data to the decoder; common paths include fetch() automatically decompressing HTTPS response bodies, and body-parser 2.1.0+ or @fastify/compress decompressing br request bodies before authentication. Node.js 18, 20 and 25 are out of support and will not receive these fixes.
The same release also fixed TLS hostname verification bypasses (CVE-2026-105483 and CVE-2026-106069) and a DNS NUL-byte truncation issue (CVE-2026-105482), all rated High.
What to do today
- Inventory the runtime that actually serves traffic:
php -v, the FPM pool binary, the container image, the Apache module, andnode -p process.version. - Patch PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12, then restart FPM, Apache, LiteSpeed or FrankenPHP. A new binary on disk does not update running workers.
- Patch Node.js to 22.23.4, 24.22.1 or 26.12.1, rebuild containers and restart processes.
- If you cannot patch, apply the temporary mitigations above and schedule a maintenance window. Do not treat them as a permanent fix.
- If a managed host or panel provider handles your runtime, ask for the changelog entry that names both PHP CVEs, not just the panel version.
At the time the fixes were released, no breach at a real organization had been confirmed, according to Insurance Business. That can change. AWS said it had seen attempted exploitation as early as October 17, and Cloudflare said it was updating firewall rules as a stopgap. A WAF rule is not a patch.
The uncomfortable lesson is not that AI can find old bugs. It is that the internet's shared plumbing is old, widely reused and slow to replace. Finding the flaw took a frontier model. Fixing it still takes a human with a maintenance window.
Sources: PHP security release; PHP Foundation; Node.js security release; Reuters, ABC News, Nikkei and 财联社 coverage of the global response.


