PHP2Shell: Critical PHP Flaw Forces Emergency Patches
Image: Christopher Bowns via Wikimedia Commons (CC BY-SA 2.0)
The internet suffered its worst security scare in a decade on Wednesday — and most Americans never noticed. On October 21, emergency patches dropped for two critical flaws in PHP, the invisible programming language running roughly 70 percent of the world’s websites. The bugs, nicknamed PHP2Shell, let a stranger with no account and no password run code on a web server. They had been hiding in plain sight for more than ten years. And they were finally found by artificial intelligence.
Security researchers say this one is different from the usual parade of software bugs. Because the flaw lives in the PHP language runtime itself — not in any single app — even a website with perfectly written code can be broken into. WordPress, Drupal, Joomla, Magento and countless storefronts, news sites and government portals all sit on top of it.
What the PHP2Shell bugs actually do
The two flaws — officially CVE-2026-109618 and CVE-2026-109619 — each scored 9.2 out of 10 on the severity scale. The UK’s National Cyber Security Centre described a vulnerability that lets an attacker trigger an out-of-memory condition, corrupt memory and, “under certain conditions, achieve unauthenticated remote code execution.” In plain English: the attacker gets a shell on the server, with a direct path to the file system and the database.
The second bug can also leak memory contents — memory that can contain passwords and other sensitive information, as CNN reported. Servers running Apache’s mod_php face the highest risk, but the flaw reaches every PHP installation that serves web requests, including PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. The vulnerable code dates back to PHP 5.4, meaning it sat in production for more than a decade. Palo Alto Networks’ early analysis counted roughly 22.6 million potentially vulnerable instances. BuiltWith puts PHP under about 24 million websites, and W3Techs estimates it powers roughly three-quarters of all sites whose language can be identified.
How AI found what a decade of humans missed
Three teams found pieces of the bug independently, within weeks of each other. Digital infrastructure defense firm Calif flagged the first piece on August 1 using OpenAI’s GPT-5.6 Sol model, part of OpenAI’s “Patch the Planet” program. Google-owned Wiz found another on August 19 using Google’s Gemini 4 Argon, OpenAI’s GPT-5.6 Sol and its own Wiz Atlas platform. OpenAI’s Codex Security team also took part, and everyone coordinated with the PHP team before the public disclosure.
Wiz researchers wrote on Wednesday: “With frontier AI models and the right tools, a single researcher completed in a week what previously would have taken a world-class team months of work.” They added: “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.”
It could have been much worse. “It could have been a really bad thing,” Calif researcher Bruce Dang told USA Today. “Imagine, nobody knew anything when – boom – today dropped. That would be extremely bad.”
The disclosure itself was chaotic. Details leaked onto Hacker News on Tuesday, a day ahead of the planned October 22 announcement, forcing PHP’s security team to pull the release forward by a full day. Source fixes landed in the php-src GitHub repository at 13:34 UTC on Wednesday, with patched versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. A purported “PHP2Shell” video circulated showing remote code execution working against WordPress, MediaWiki, phpBB, Magento, Joomla, Laravel, Symfony, Drupal and WHMCS. Volker Dusch, a security engineer at the nonprofit foundation overseeing PHP, told The Wall Street Journal it was the project’s most serious security problem in more than a decade — and compared it to Heartbleed, the 2014 flaw that sent administrators worldwide scrambling.
Governments pulled the plug worldwide
The response was immediate and global. The US National Security Agency’s Cybersecurity Collaboration Center advised operators to update immediately — or take systems offline: “These vulnerabilities often provide a direct path to the server’s file system or database. If an immediate update is not feasible, it is recommended that organisations take the system offline.”
Britain’s NCSC said the same: “Where immediate remediation is not feasible, organisations should consider taking the system offline until it can be fully mitigated.” The EU’s CERT-EU told operators to “consider isolating internet-facing applications from public networks until a fix can be applied.” Cyber agencies in Australia and Japan issued similar alerts.
And many did exactly that. Finland’s state IT provider Valtori took government public services offline “as a precautionary measure.” In the Netherlands, the National Cyber Security Centre pulled its own site, alongside the Port of Rotterdam, the Overheid.nl portal, the KNVB football association and several hospitals. France’s Interior Ministry put all its sites into preventive maintenance. Denmark’s Kombit shut down several services. In the UK, Edinburgh Council and several BBC programme pages went dark. Wikipedia, operated by the Wikimedia Foundation, said it had taken down an unspecified number of systems until they could be patched. According to Reuters, several government websites in Europe went offline as companies updated their systems.
The patch race is far from over
Emergency patches landed on Wednesday — but they cover only PHP 8.2 and newer. That leaves a long tail of older sites exposed. On Reddit’s r/PHP and r/technology forums, administrators running older PHP 7.x sites — a large share of the WordPress estate — reported waiting on backported fixes from Linux distributions, while others noted cloud platforms such as AWS Elastic Beanstalk had yet to ship the update. Several argued the long tail of unmanaged sites would take months to patch, and some never will.
Meanwhile, attackers are already probing. “Cloudflare has observed exploit attempts, including spikes of thousands of attempts,” Daniele Molteni, the company’s director of project management, told USA Today. “We also saw attackers modifying their tactics to try to bypass protections.” Cloudflare deployed firewall protections before the public disclosure, and reported early attacks overnight — before the official patch was even out.
“These are critical vulnerabilities and anyone using PHP should upgrade as soon as possible,” PHP Foundation executive director Elizabeth Barron told USA Today.
What this means for ordinary Americans
For most people, the danger is not that your own computer is infected — it is that the sites you trust could be. If attackers seized an unpatched server, they could read or steal customer data, plant malicious code on pages you visit, or take the site offline entirely. Shoppers, online banking users and anyone with accounts on smaller websites are the most exposed, because big platforms patched fastest while the long tail of small and mid-size sites scrambles.
If you run a website yourself — a small business store, a church page, a WordPress blog — check your PHP version today and update to the patched releases. If you cannot patch immediately, the official advice from the NSA and the UK’s NCSC is blunt: take the site offline until you can.
The episode also marks a turning point in cybersecurity itself — one Washington is already taking seriously. The US recently banned DeepSeek from federal contracts over security concerns, and now the AI-offense question cuts both ways: the same class of tools that found PHP2Shell in a week can help attackers weaponize it in hours. When even tech giants are under enforcement pressure — Meta was just ordered to pay $25 billion in a New Mexico privacy case — regulators will be watching how quickly the industry closes the gap.
What happens next
The next few weeks are the danger window. The NSA, the NCSC, CERT-EU and agencies in Australia and Japan all pushed the same message: patch now, or go dark. The White House said it was first made aware of the flaw on October 16, so US agencies have been moving behind the scenes for days. OpenAI says the episode shows how AI can now uncover bugs with internet-scale impact, and it is proposing a new playbook for how the security world responds when that happens — because next time, it might not be the defenders who find it first.
Wiz researchers put it bluntly: like Heartbleed, PHP2Shell could serve as a turning point in cybersecurity. A decade-old flaw, found by machines in a week, touched off a worldwide scramble to patch 70 percent of the internet. The machines are getting better at finding these. The question now is who they are working for.
Comments
Join the conversation