PHP2Shell: AI Found Critical Flaws in the Software Behind 70% of the Web
📑 Table of Contents
Introduction: Patch Now or Go Offline
This week, the U.S. National Security Agency gave organizations that run PHP — the programming language behind roughly 70% of all websites — an unusually blunt instruction: apply the emergency security update immediately, and if you can't, take your systems offline. Governments in the Netherlands, Denmark, France, Finland, and Canada did exactly that, pulling public websites down as a precaution. Wikipedia, 4chan, DeviantArt, and even Pokémon Home went dark while operators patched.
The trigger is PHP2Shell: two critical vulnerabilities in the PHP language itself — not in any application built on it — that allow unauthenticated remote code execution. In plain terms: an attacker can run their own code on your server, without a login or password, on nearly any PHP site that hasn't been updated. And the part that makes this story different from every prior web mega-vulnerability: the flaws were found by AI models.
💡 Key Number: Cloudflare saw thousands of exploit attempts in the 10 hours before the public announcement, hundreds of thousands within two hours of it, and millions by Thursday morning — with attackers actively adapting to bypass protections.
What Is PHP2Shell?
PHP2Shell is the name security researchers gave to a chain of memory-safety bugs in PHP's core engine, disclosed on October 21, 2026 alongside patched PHP releases. The two headline flaws carry real weight:
| Vulnerability | Root Cause | What an Attacker Gets |
|---|---|---|
| CVE-2026-109618 | Use-after-free in the upload-progress unserializer, triggered via out-of-memory error handling | Unauthenticated remote code execution on WordPress, Drupal, and Joomla — plus remote memory disclosure on any PHP app |
| CVE-2026-109619 | Stale global state surviving a fatal error, reused by the next request on the same worker | Pre-authentication RCE via corrupted process and OPcache state |
Three details make this exceptionally dangerous. First, exploitation is application-agnostic: the bugs live in PHP itself, so even a bare "Hello World" script is attackable — WordPress, Joomla, and Drupal were just the demonstration targets. Second, every PHP version released in the last decade is affected, going back to PHP 5.4. Third, even without achieving code execution, attackers demonstrated they could read passwords, API keys, and authentication tokens straight out of server process memory.
How AI Found Bugs Humans Couldn't
Here's where the story becomes an AI story. The security firm Calif identified the first critical flaw using OpenAI's GPT-5.6 Sol model as part of OpenAI's "Patch the Planet" initiative. Independently, Wiz Research (now part of Google) discovered both vulnerabilities using a combination of its own Wiz Atlas platform, Google's Gemini 4 Argon, and GPT-5.6 Sol — with Wiz crediting Argon in particular for finding the flaw, developing the exploit, and validating the patch.
The PHP Foundation noted that an exploit for one of these bugs was actually theorized in 2024, but no concrete attack path was ever found — demonstrating exploitability required "an exceptionally complex chain of steps, at the edge of what human researchers could practically achieve." Frontier AI models substantially lowered that barrier, turning a decades-old latent flaw into a working exploit in weeks. Wiz's timeline tells the story: discovery on August 19, confirmed RCE on Drupal the next day, WordPress the day after that, and a report to PHP's security team on August 24.
OpenAI then spent two months leading a coordinated coalition — PHP's maintainers, Wiz, Cloudflare, AWS, Microsoft, Automattic, Akamai, Fastly, Imperva, and Vercel among them — plus CISA, the Office of the National Cyber Director, and the White House's Super Intelligence Force, to prepare patches, WAF rules, and detections before public disclosure. It even shipped a PHP version-checker as a Codex skill for operators.
The Global Response — and the Leak
The carefully choreographed disclosure nearly held. Patched PHP releases landed October 21 — but technical details leaked online a day early, and the race was on. Cloudflare's CEO reported exploit attempts spiking from thousands to millions within hours. Amazon disclosed that it had detected exploitation attempts before the public announcement, and said it's unclear how attackers learned about the flaws. The NSA and FBI both issued warnings; the UK's National Cyber Security Centre echoed the "take it offline if you can't patch" guidance.
For context on scale: PHP powers WordPress, Joomla, Drupal, and Wikipedia's MediaWiki. GoDaddy advised that any site using PHP should assume it's affected. If your site runs on Squarespace or Wix, you're in the clear — neither supports PHP. Everyone on Hostinger, Bluehost, GoDaddy, or any PHP-based stack is not.
What Site Owners Should Do Right Now
- Update PHP immediately to the October 21, 2026 patched releases. Every version from the last decade is affected; there is no "probably fine."
- Check your PHP version — if you're on PHP 8.1 or older, there is no official fix coming. Those branches are end-of-life; you must upgrade to a supported release.
- On managed hosting? Check with your provider about patch timing — most large hosts deployed fixes automatically, but verify, don't assume.
- Can't patch right away? Enable your provider's WAF mitigations (Cloudflare, Akamai, Imperva, and Vercel all shipped rules), and follow the NSA guidance: if you handle sensitive data and can't patch or mitigate, take the site offline until you can.
- Rotate credentials — database passwords, API keys, and tokens stored in server memory may have been readable by attackers. Assume exposure and rotate.
The Double-Edged Sword for AI Tools
PHP2Shell is the clearest demonstration yet that AI has changed the economics of security on both sides. The same class of models that found these flaws in weeks — after humans theorized about them for two years without a proof of concept — can also help attackers develop and adapt exploits, which is exactly what Cloudflare observed within hours of disclosure.
For teams, this makes AI-powered security tooling a baseline rather than a luxury. Code-scanning tools like Semgrep and Snyk now run AI-driven detection on dependencies and custom code; Wiz's cloud-native platform (see related cloud security tooling here) integrates AI research directly into vulnerability detection and response. And on the building side, AI coding agents like Cursor and GitHub Copilot are increasingly used to apply and verify security patches at machine speed — OpenAI literally shipped its PHP checker as a Codex skill.
The takeaway for anyone choosing AI tools in 2026: prioritize products with strong security workflows, fast patch cycles, and AI-assisted vulnerability detection built in. The gap between tools that ship fixes in hours and tools that ship them in weeks is now an existential difference.
Frequently Asked Questions
Is my WordPress site vulnerable to PHP2Shell?
Almost certainly, if it runs on an unpatched PHP version. Every PHP release from the last decade — back to PHP 5.4 — is affected by at least one of the flaws, regardless of what application runs on top. Update to the October 21, 2026 patched release immediately.
Who found the PHP2Shell vulnerabilities?
Two independent teams. Security firm Calif found the first flaw using OpenAI's GPT-5.6 Sol under the "Patch the Planet" initiative, and Wiz Research found both flaws using Wiz Atlas, Google's Gemini 4 Argon, and GPT-5.6 Sol. PHP patched both on October 21, 2026.
Can attackers really run code on my server without a password?
Yes. The flaws enable unauthenticated remote code execution — no admin login or credentials required. Exploitation was demonstrated against the latest WordPress, Drupal, and Joomla container images, and it works against plain PHP applications too.
What if I can't update PHP immediately?
Enable WAF protections from your CDN or hosting provider (Cloudflare, Akamai, Imperva, and others shipped mitigation rules), and follow NSA guidance: if your site handles sensitive data and can't be patched or mitigated, take it offline until it can.
Find AI Tools You Can Trust
Browse 1,100+ curated AI tools on aitrove.ai — including AI security, coding, and DevOps tools that keep your stack patched and protected.
Browse All AI Tools →