
AI Finds PHP2Shell Flaw Affecting 70% of World's Websites
AI models GPT-5.6 Sol and Gemini 4 Argon found critical vulnerabilities in PHP, the language behind 70% of websites, forcing emergency patches on October 21, 2026.
PHP is the programming language behind roughly 70% of the world's websites, including WordPress, Drupal and the MediaWiki software that runs Wikipedia. On October 21, 2026, the PHP Foundation released an emergency patch for two critical vulnerabilities dubbed PHP2Shell. What makes this story unusual: the flaws were found by AI models before attackers could discover them.
The two vulnerabilities, CVE-2026-109618 and CVE-2026-109619, each carry a severity score of 9.2 on the CVSS v4 scale. Attackers could execute code remotely without needing to log in, read sensitive data like passwords and API keys, or crash servers. Wiz Research, the security company owned by Google, called them among the most severe vulnerabilities in software history, comparable to Heartbleed in 2014 and Log4Shell in 2021.
1. How AI found the vulnerability
Security firm Calif discovered the first flaw in August 2026 during an audit of PHP's source code. The audit was funded by OpenAI's Patch the Planet initiative, and Calif used the GPT-5.6 Sol model. Wiz Research found both flaws independently, weeks later, using Wiz Atlas, Google's Gemini 4 Argon, and GPT-5.6 Sol.
According to Wiz, the vulnerable code had been present for over a decade. Building a working exploit required a chain of complex steps that previously sat at the edge of what human researchers could practically achieve. AI models substantially reduced that barrier. A single researcher, with AI help, completed in a week what previously would have taken a world-class team months, Wiz wrote in its blog post.
OpenAI calls the period between discovery and public disclosure the "Defender's Window." According to the company, frontier AI found these vulnerabilities before attackers did, giving maintainers and security providers time to prepare fixes.
2. Who said what: differing claims between OpenAI and Wiz
OpenAI and Wiz give slightly different accounts of their respective roles. OpenAI states it "led a coalition of maintainers, researchers, and security providers" over two months, and that Calif "identified a critical flaw using GPT-5.6 Sol." Wiz states it found both flaws independently and used Wiz Atlas, Gemini 4 Argon, and GPT-5.6 Sol throughout the research. Wiz specifically credits Gemini 4 Argon as making an invaluable contribution to finding the vulnerability, exploit development, attack detection, and patch validation.
Calif struck a more measured tone. In its own write-up, the firm said it used generally available models with no special tooling, and that knowing PHP's history mattered more than the model itself. "No model is simply capable of unearthing 'all bugs' with simple prompts, at least for now," Calif wrote.
3. Government websites went dark, early attacks detected
Warnings and advisories came fast. The US National Security Agency (NSA) advised all organizations using PHP to prepare for an update, and if unable to do so, to take systems offline. The UK's National Cyber Security Centre (NCSC) issued a similar warning. EU CERT also advised taking websites offline if patches could not be applied immediately.
Government websites in France, Denmark, Finland and the Netherlands went temporarily dark on October 21 to install emergency updates. Services like Pinboard, the GrapheneOS forum, and the streaming tool OBS pulled parts of their sites down. Laravel halted its Cloud deployments while rebuilding on patched images.
Cloudflare reported that early attacks had already begun before the official disclosure. CTO Dane Knecht wrote on X that Cloudflare was seeing "early attacks emerging" and updating mitigations as new vectors appeared. Cloudflare activated firewall rules for all customers, including free accounts, at 03:02 UTC, roughly nine hours before public disclosure.
4. Affected versions and what to do
The vulnerabilities affect every PHP version released in the last decade, going back to version 5.4. Patches are available for PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35. PHP also issued backported fixes for the unsupported 7.4, 8.0, and 8.1 branches, given the severity.
Wiz and Cloudflare emphasize that these flaws live in the PHP engine itself, not in the application running on top of it. This means even a simple "Hello World" site on an affected PHP version is vulnerable. Updating your application code or plugins alone is not enough. You need to update PHP itself.
Cloudflare recommends keeping WAF rules enabled while applying the patch. The PHP Foundation calls updating "the only safe choice" and warns that no configuration change is a complete substitute for the patch.
5. AI as a double-edged sword
OpenAI itself acknowledges that the same capability that lets AI find vulnerabilities can also help attackers build exploits faster. In its blog post, OpenAI wrote: "AI can uncover security flaws with internet-scale impact, but the same capabilities can also help attackers rapidly develop offensive tools and exploits."
To support defense efforts, OpenAI committed USD 1 billion in subsidized access to its Daybreak for Frontline Defenders program, aimed at organizations with limited security resources protecting essential services. The company also released a PHP version checker as a Codex skill to help operators identify vulnerable PHP versions.
This is not the first time AI-found flaws in web software forced a mass update. In July 2026, vulnerabilities in WordPress found with AI assistance were mass-exploited. OpenAI says it expects similar findings to "increase sharply" in the coming months.
What it means for you
PHP2Shell shows that AI now plays a two-sided role in cybersecurity: it can find and patch vulnerabilities before attackers do, but it can also turn longstanding flaws that were once impractical to exploit into viable attack targets. If you run a website or work with an IT team, here is what to do:
- Update PHP now if your site runs version 5.4 or newer. Install 8.5.12, 8.4.27, 8.3.36, or 8.2.35 depending on your current version.
- Ask your web host if you do not manage PHP yourself. Contact your hosting provider and ask whether the PHP2Shell patch has been installed.
- Enable a web application firewall like Cloudflare WAF if available, as an extra layer of defense while you wait for or apply the patch.
- Check your server logs for unusual activity. Cloudflare reported early attacks began before the official disclosure.
- Do not ignore old versions. PHP 7.4, 8.0, and 8.1 are no longer supported, but backported patches are available given the severity. Upgrade to a supported version as soon as possible.
Sources
- Patch the Planet: coordinated disclosure of critical PHP vulnerabilities (OpenAI)
- PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet (Wiz Research)
- AI helped find a critical security flaw affecting 70% of the internet (CNN)
- Severe vulnerability in common website code triggers global alarm (UPI)
- PHP rushes out emergency patches for two critical bugs AI found first (The Next Web)
- Cloudflare deploys protections against php2shell vulnerability (Cloudflare)