Most of the World’s Websites Threatened by Critical PHP Flaws Found With AI
TL;DR — Key Takeaways
- AI-powered researchers uncovered two critical PHP vulnerabilities, dubbed PHP2Shell, that could expose roughly 70% of the world’s websites to remote code execution, data theft, and defacement.
- Both flaws carry a critical 9.2 CVSS score, affect PHP versions dating back to at least 5.4, and could let unauthenticated attackers execute code or access sensitive memory containing passwords, API keys, and authentication tokens.
- Frontier AI models from OpenAI and Google, alongside Wiz’s multi-agent system, helped researchers turn decades-old bugs into working exploits in hours—a potential turning point that could also empower attackers to scale sophisticated attacks.
- PHP has released patches, and organizations should update immediately, identify every affected deployment, and investigate potential exploitation, as some security researchers report detecting activity targeting the flaws.
Two critical vulnerabilities in PHP found with the help of frontier AI models threaten the 70% of websites in the world that use the programming language, putting them at risk of attackers taking control of their systems, stealing sensitive information, or defacing them.
Wiz, OpenAI, and Calif – a cybersecurity firm that uses AI in offensive security research for OpenAI, Anthropic, and Google’s DeepMind, among others – have been working for two months to address critical flaws in PHP. Now that the information is out, they and other cybersecurity experts are urging organizations to quickly apply the patches that PHP’s security team released October 21.
“These findings rank among the most severe vulnerabilities discovered in PHP, and arguably in software history,” researchers with Google-owned Wiz wrote in a report. “The underlying flaws had been present for decades, but demonstrating their exploitability required an exceptionally complex chain of steps, at the edge of what human researchers could practically achieve. Frontier AI models substantially reduced that barrier, turning a longstanding flaw into an exploit.”
PHP2Shell
The remote code execution (RCE) vulnerabilities – known collectively as PHP2Shell – each carry a CVSS severity score of 9.2 out of 10. One flaw – CVE-2026-109618 – is found in PHP’s out-of-memory handling. According to Huntress, if PHP runs out of memory while creating request data, the work is interrupted and the data is only partially initialized. In the process of cleaning up the request, the data is treated as valid, making RCE possible.
The other vulnerability, CVE-2026-109619, results from PHP retaining request-specific state after its backing memory has been freed.
“If the same worker processes a later request, PHP may access that stale state before the normal initialization resets it,” Huntress researchers wrote. “This vulnerability can lead to unauthenticated heap use-after-free, memory disclosure, and remote code execution with the web worker’s privileges.”
Fixes Released
PHP’s security team released PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, which it says fix the two vulnerabilities.
Huntress researchers said they had yet to see exploitation of the flaws in the wild, but others – including watchTowr and Cloudflare CTO Dane Knecht – they’ve detected some.
“As expected, watchTowr Intel is already observing in-the-wild exploitation of the latest PHP vulnerabilities, with a variety of vibe-coded PoCs [proofs-of-concept] already hitting our sensors featuring a variety of ‘php2shell’ user-agents,” said Jake Knott, head of threat intelligence for watchTowr. “Whilst nobody has been successful to date, we don’t expect that will last long.”
According to the Wiz researchers, the flaws have been in the PHP codebase for more than a decade and that almost every version of the language dating back to PHP 5.4 is affected by at least one of the flaws. Through the flaws, attackers can not only execute code on the systems but also read process memory that could include passwords, authentication tokens, API keys, and certificates that come from the server or that belong to other requests.
Another ‘Turning Point’ Threat
They compared PHP2Shell to other vulnerabilities that they described as “turning points” in security, including Heartbleed in 2014 and Log4Shell in 2021.
“We believe PHP2Shell could mark a similar turning point for the AI era, illustrating how AI can change the practical exploitability of longstanding vulnerabilities,” they wrote. “Building the exploit required chaining multiple flaws and adapting to each target’s memory layout through repeated testing and debugging. Frontier models were critical to making this process practical, enabling us to develop and adapt working exploits across multiple applications in hours.”
The researchers wrote they used Wiz Atlas, a multi-agent system built by Wiz, Google Cloud, and DeepMind, as well as Google’s Gemini 4 Argon reasoning model and GPT-5.6 Sol, a frontier model from OpenAI. All were crucial in moving from flaw detection to creating working exploits.
AI Helps Security Teams, Attackers Alike
“Memory bugs are notoriously complex; differences in PHP versions, configurations and application behavior can break assumptions the exploit depends on,” they wrote. “An attack that works against one deployment may need substantial adjustments to work against another, each requiring further analysis, testing and debugging. Pre-AI, this manual work would be difficult to implement and even harder to scale.”
It’s also changed the game for threat actors, who can also use AI models in their work, which lowers the level of specialization they need to run and scale such complex attacks.
“This changes the economics of both discovery and exploitation,” the researchers wrote. “As AI reduces the effort needed to develop and adapt complex exploits, vulnerabilities that once seemed impractical to exploit become viable targets.”
What’s key is being first to detection, OpenAI analysts wrote.
“To our knowledge, frontier AI found these vulnerabilities before attackers did, opening a Defender’s Window for maintainers and security providers to prepare fixes and protections ahead of disclosure,” they wrote.
Preparation is Key
The emergency security update for PHP2Shell shows how quickly organizations can be forced to respond when serious vulnerabilities become public, according to Lee Rossey, co-founder and CTO of SimSpace, which helps organizations prepare for cybersecurity attacks.
“Before a patch is released, teams should already know where PHP is running, who can authorize urgent changes, and how they will confirm the update worked,” Rossey said. “They also need to check whether attackers reached those systems before the fix was in place.”
Readiness can’t be improvised in such a fast-moving case like PHP2Shell, he said, adding that it has to be tested in advance under realistic conditions.
“Preemptive security means proving that people, processes and technology can perform before the unknown becomes a crisis,” Rossey said.

