TNN — Torbrook News Network
TNN Analysis · Tech / Cyber

PHP2Shell: two critical PHP flaws found with AI expose the language behind about 70% of websites to takeover, and Cloudflare says exploit attempts are now in the millions

CVE-2026-109618 and CVE-2026-109619, rated CVSS 9.2, let attackers run code on unpatched servers without logging in. Researchers demonstrated attacks on WordPress, Drupal and Joomla. British, Finnish and French government sites went offline, Japan's prime minister issued an urgent appeal, and the fix is a PHP upgrade most site owners have never had to rush.

By the TNN Analysis Desk· October 23, 2026 · 7 min read
PHP2Shell: two critical PHP flaws found with AI expose the language behind about 70% of websites to takeover, and Cloudflare says exploit attempts are now in the millions
Web source code on a developer's monitor. The image is illustrative and does not show PHP2Shell exploit code. Photo: Markus Spiske markusspiske (CC0), via Wikimedia Commons.

The flaws were not new. That is the detail that should unsettle anyone who runs a website. According to Wiz Research, the vulnerabilities now known as PHP2Shell have been present in the PHP language for about a decade, in every version released in that time and in some going back as far as PHP 5.4. What changed this autumn was not the code. It was the cost of finding a way to exploit it.

"Demonstrating their exploitability required an exceptionally complex chain of steps, at the edge of what human researchers could practically achieve," Wiz said. AI models, it added, have "substantially reduced that barrier, turning a longstanding flaw into an exploit." The same week that capability helped defenders find the bugs, attackers began trying to use them at scale.

What was found, and what it allows

PHP, short for Hypertext Preprocessor, is the server-side language that Wiz calls "the backbone of the web". It runs, by the researchers' estimate, about 70 per cent of the world's websites, including the WordPress, Drupal and Joomla content-management systems that power a large share of news sites, shops, blogs and government portals.

The disclosure covers four memory-safety bugs grouped under two identifiers: CVE-2026-109618, an out-of-memory corruption issue, and CVE-2026-109619, a stale global state issue. Both carry a CVSS severity score of 9.2 out of 10. The PHP Foundation said remote code execution was confirmed for both on Apache servers running mod_php.

The mechanism is subtle, which is why it survived so long. According to Wiz's technical write-up, the bugs arise when PHP hits a fatal error, especially an out-of-memory error, part-way through handling a request. The request is aborted, but some internal bookkeeping survives, still pointing at memory that has been freed. The next request handled by the same worker process can then reuse that stale state. In one variant, leftover heap contents leak back to the attacker inside a session cookie, even if the website never uses PHP sessions at all. In others, an attacker can steer the reused memory to take control of the process.

The design choice that makes this possible is a performance one. To serve pages quickly, PHP servers keep a pool of worker processes alive and hand each new request to one of them, rather than starting a fresh process every time. That reuse is why the web's busiest PHP sites can answer thousands of requests a second. It is also why state left behind by one aborted request can matter to the next. A score of 9.2 places both identifiers in the critical band of the CVSS scale, which begins at 9.0.

In practice, Wiz said, that meant unauthenticated remote code execution against the latest container images of WordPress, Drupal and Joomla at the time of testing, and memory disclosure that could expose passwords, tokens, API keys and certificates held by the server. Even a simple "Hello World" page on an affected PHP version could be vulnerable, because the flaws sit in the language rather than in any particular application.

"Both issues sit in parts of PHP that nearly every request touches: memory management and error handling. Their central place in PHP is what made both vulnerabilities serious, and also so hard to fix." — the PHP Foundation

How AI found it

Wiz's timeline gives an unusually precise account of the discovery. The first vulnerability was found on August 19 using Wiz's own Atlas tool alongside Google's Gemini 4 Argon and OpenAI's GPT-5.6 Sol models. Unauthenticated code execution was confirmed against Drupal the next day and WordPress the day after. The findings, credited to Calif, Wiz and OpenAI, were reported to the PHP security team on August 24. PHP acknowledged them on September 21 and published patched releases with public disclosure on October 21.

Early reporting credited OpenAI's technology alone; Wiz's own account credits both companies' models, and says the large language models helped adapt exploits to different PHP versions, configurations and memory layouts, iterating through failures with debugging tools until the chains worked. OpenAI called the bug "one of the most impactful vulnerabilities in recent memory". Raluca Ada Popa, head of Gemini security at Google DeepMind, said the work showed "why frontier AI is a game-changer for cyber defense".

That framing is accurate and incomplete. Two months passed between discovery and patch, which is normal for a coordinated fix to a core language. But the reason the bugs went unexploited for a decade was that exploiting them was hard. If frontier models can now do that work for defenders within hours, the same models, or ones like them, lower the bar for attackers too.

Governments took their own sites down

The response since disclosure has been unusually blunt. The UK's National Cyber Security Centre told organisations to "take immediate action" to update to a patched version. The US National Security Agency warned organisations using PHP to "maintain heightened awareness" over the coming weeks. China's Industry Ministry urged entities to review security gaps.

Dozens of British and Finnish government services were taken offline this week, according to NPR, and many French local-government sites were briefly taken down. In Japan, Prime Minister Sanae Takaichi issued "an urgent request for everyone to take action", adding that "temporarily suspending websites and similar measures can be considered an effective way to reduce risk" if a patch cannot be applied promptly. A head of government recommending that websites switch themselves off is a measure of how seriously the flaw is being treated.

The attacks arrived almost immediately. Matthew Prince, chief executive of Cloudflare, said the company saw tens of thousands of attempts to exploit the flaw in the first 45 minutes after it became public, and that the count had reached the millions by Thursday. SecurityWeek reported that proof-of-concept exploits were circulating before the patches landed, and that several security firms saw exploitation attempts even before release. watchTowr said its sensors recorded the first in-the-wild attempts around the time of the patch but had not observed a successful one. "Whilst nobody has been successful to date, we don't expect that will last long," said Jake Knott, its head of threat intelligence.

What site owners need to do

The fix is in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older no longer receive official updates, but the project's security team released minimal source backports for 7.4, 8.0 and 8.1, and several Linux distribution maintainers have backported the fix to older packages. Wiz is explicit that "applying the PHP security update remains the only complete remediation."

For servers that cannot be upgraded at once, Cloudflare, Fastly and Vercel have published guidance or automatic mitigations at the network edge. Wiz advises administrators to watch for unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses, unusually large or malformed PHPSESSID cookies, and unexplained churn of PHP worker processes. It also warns that the two CVEs may not cover every variant of the underlying problem.

The practical difficulty is that PHP is often invisible to the people responsible for it. Many small businesses run WordPress on shared hosting and have never chosen a PHP version; their host did. Others stay on old PHP versions because upgrading can break older plugins. A flaw in an application can be fixed by the application's vendor. A flaw in the language requires every server operator to act.

The case against panic

There are reasons for measured calm. The patches were ready at disclosure, which is the outcome coordinated disclosure is designed to produce. Large hosts and content-delivery networks can filter malicious requests for millions of sites at once, and Cloudflare's own figures describe attempts, not compromises. watchTowr had not seen a successful attack. Exploiting memory-corruption bugs reliably across different server configurations remains harder than sending one malicious request.

The counter-argument is the arithmetic of the web's long tail. A small percentage of unpatched servers, across the vast number of sites that run PHP, is still an enormous target set, and the attackers now have working proof-of-concept code. The window between disclosure and mass exploitation has been measured in hours.

The durable lesson of PHP2Shell is not about one language. It is that the backlog of old, hard-to-exploit bugs in core internet software is now within reach of anyone with access to capable AI models. Defenders found this one first and published a fix. The task for every operator is to assume the next one will be found just as quickly, and to be able to patch faster than they ever have before.

This analysis is based on Wiz Research's technical disclosure of PHP2Shell, statements from the PHP Foundation and OpenAI, reporting by NPR and SecurityWeek, and public guidance from the UK National Cyber Security Centre, the US National Security Agency and the Japanese government, as of October 23, 2026. Exploitation figures are company estimates reported by Cloudflare and watchTowr. The 70 per cent figure is Wiz's estimate of PHP's share of websites. Administrators should rely on the PHP project's own release notes and their vendor's advisories for patching instructions.