Everyone patched PHP. Now find the other PHP.
Two bugs older than most of the people fixing them gave unauthenticated attackers the run of the PHP runtime. The patch took a day. The inventory will take the rest of the year.
By June Abernathy, Wire Editor, Dispatches7 min read
On the evening of Monday, October 20, the PHP project posted a notice that it would ship an out-of-band security release the next afternoon for two critical bugs, both rated 9.2 on CVSS v4. By the time the fixes landed at 14:00 UTC on Tuesday, the Dutch government had taken its citizen login service, its tax portal and the website of the lower house of parliament offline. France's Interior Ministry had pulled every prefecture site. Finland's state IT provider had switched off public services. Australia's national cyber security centre took down cyber.gov.au, which is the page you would normally visit to read about this sort of thing.
None of those organizations had been breached. They had read the advance notice, done the arithmetic on how long a patch takes to reach a few thousand servers, and decided that a dark website was cheaper than a compromised one. It is the most sensible thing a government has done with a vulnerability in years, and it was greeted mostly with jokes about PHP.
The jokes are fair. The bugs are not funny.
What the bugs are
The two flaws, tracked as CVE-2026-109618 and CVE-2026-109619 and collectively nicknamed PHP2Shell, sit in the PHP runtime itself rather than in any application written on it. A clean WordPress install on a patched operating system was exposed. So was a Drupal site with no plugins, a Laravel app that had passed three audits, and the forgotten PHP admin panel on the storage appliance in the closet.
The first bug is about what happens when PHP runs out of memory at the wrong moment. The runtime exits the current work abruptly when an allocation fails, and if that happens while a request is only partly set up, the cleanup code that runs afterwards can treat half-initialized memory as if it were valid. The project's advisory lists several ways an attacker can push a worker to that point while staying inside the apparent request-size limits, including multipart uploads with no usable declared length and form parts with an unlimited number of headers.
The second is about state that outlives the request it belongs to. PHP's session upload progress feature, which is on by default, can touch session handling before the runtime has finished setting up the request. Internal state tied to one request can survive after its memory has been freed, and the next request handled by the same worker may use it.
Both lead to remote code execution without credentials. The project said the risk was highest for Apache's mod_php, where "an unauthenticated request can trigger the attack before any application code runs." PHP-FPM, the more common modern setup, is harder to exploit but not exempt. Even without reaching code execution, an attacker can read memory from the worker, which is where passwords, session tokens, API keys and certificates from other people's requests tend to be.
The underlying code has been in PHP for more than a decade. One of the project's own developers saw signs of the first bug during an external audit in 2024 and could not find a path to exploitation. The path existed. It was just long.
Who shortened it
The bugs were found in August by two groups working separately: researchers at the security firm Calif, through OpenAI's bug-finding program, and a team at Wiz. Both reported to the PHP security team within days of each other, and both say frontier language models were central to the work, not for spotting the bug in isolation but for turning a twenty-year-old memory-handling quirk into an exploit that works against a real server.
Wiz was candid about this. The exploit chain, it wrote, was "exceptionally complex," and the models "substantially reduced that barrier." Calif's researcher traced the lineage of the technique to PHP research from 2004 and said that knowing where to look still mattered: the models did not start from obscure primitives on their own. One researcher, a week, instead of a team and a quarter.
The uncomfortable corollary arrived within hours of disclosure. Joviane Jardim, a senior researcher at Detectify, told The Record that most attackers could now build a working exploit "in under an hour" with the same class of tools, and watchTowr's head of threat intelligence, Jake Knott, said the proof-of-concept tooling his firm was watching in the wild had been built with AI help. Whatever the models gave the defenders in August, they handed to everyone else in October.
What the disclosure looked like
The coordinated date had been later in the week. On Monday an anonymous post on Hacker News named both CVE identifiers and claimed a disclosure on October 22, which forced the project's hand. It published its notice that evening and moved the release to Tuesday. That same night, Calif accidentally posted a video of its working proof of concept, then took it down.
Cloudflare turned on blocking rules for its customers at 03:00 UTC on Tuesday, eleven hours before the patch existed, and its chief technology officer said the company was "seeing early attacks emerging." Chainguard published patched container images around 07:40, before the fix was public, from a coordinated advance copy. At 11:26 UTC, watchTowr said it had seen no exploitation in the wild. At 14:19, nineteen minutes after the release, it said it was seeing active attempts against both bugs.
A week later Palo Alto Networks confirmed the flaws were being used against the management interfaces of its own firewalls where those interfaces were exposed to the internet, chained with a Linux kernel bug to reach root. The company put the affected share of its installed base at two hundredths of a percent, which is a small number attached to a large one. The same vendor's research arm had earlier reported that attackers inside a European government agency used an AI agent to harvest credentials after breaking in through PHP2Shell. It withdrew that claim two days later, saying it could not confirm the initial access was related. We mention it because the version that spread was the first one.
The part that is actually hard
Patching PHP is not the problem. The fixed releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35, and they were available within a day. The problem is the second half of this story's headline.
PHP runs, by Wiz's estimate, roughly seventy percent of websites. Jardim put the share on outdated versions at about half. PHP 8.1 and everything older receive nothing from the project; community backports exist for 7.4, 8.0 and 8.1, and Linux distributions have shipped fixes under their own package versions, which means the version string on a server tells you nothing and the package changelog tells you everything. PHP 8.2 reaches end of life on December 31 of this year.
Then there is the PHP you do not think of as PHP. Hosting control panels. Mail web clients. The admin page on the network storage box. Monitoring dashboards installed in 2017 by someone who has since left. Firewall management interfaces, as it turns out. Sophos's Don Smith told The Record that the challenge "is finding every PHP instance, not just installing patches," and recommended that anything exposed to the internet that cannot be patched be isolated from it until it can. That is the quiet policy the Dutch and the French applied on Tuesday morning, and it is available to everyone.
What to do
- Update PHP and restart every worker. Apache, PHP-FPM pools, and long-running processes such as queue workers all need a restart. The project's advisory is explicit: "There are no complete mitigations, updating is the only safe choice."
- Check the package changelog, not the version. On Debian, Ubuntu, RHEL and their derivatives the fix arrives under the old version number. Look for the CVE identifiers in the changelog.
- Turn off session upload progress anyway. Set
session.upload_progress.enabled=0in php.ini or the FPM pool configuration, not viaini_set(), then restart. It closes one of the two bugs' paths, and on October 23 the project said the same setting protects against a third, unpatched issue, CVE-2026-115560, that it plans to fix in the next regular release. Almost nothing legitimate depends on the feature. - Apply the interim limits if you cannot patch today. Pin
memory_limit=-1so applications cannot override it, keeppost_max_sizesmall, and have the web server or proxy bound request size, header count, multipart part count and nesting depth. The project says these reduce exposure and do not make an installation safe. - Look back. The researchers list the signals: unusual multipart requests followed by memory-limit errors or runs of HTTP 500s, oversized or malformed
PHPSESSIDcookies in responses, and PHP workers restarting without explanation. Application logs will show little, because the bug runs underneath the application. - Rotate what the worker could see. If an exposed server was unpatched for more than a few hours after October 21, treat database passwords, API keys and session secrets configured on it as readable and replace them.
- Find the rest. Search by port and banner, not by asset register. Count the control panels, the appliances and the dashboards. Anything that cannot be patched comes off the internet.
The fix for this one shipped in a day. The thing it exposed is that most organizations cannot say where PHP is running, and until that list exists, the next out-of-band release will go exactly the way this one did: the people who know what they own will patch it before lunch, and everyone else will find out from the logs.
About the writer
Wire Editor, Dispatches
June edits the wire desk, where the stories are short and the patch gaps are long. She specializes in supply chains, vulnerabilities, and the maintainers nobody pays.