Technology news, reviews and explainers

Security

PHP2Shell: AI-Found PHP Flaws Force Emergency Patches and Take Government Sites Offline

PHP2Shell: two critical PHP flaws found with AI help let attackers run code on web servers. Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 now.

Illustration of a rack of PHP servers with red and green status lights, a red warning shield above the labels CVE-2026-109618 and CVE-2026-109619, and a terminal showing PHP upgraded from 8.5.11 to 8.5.12
Image: VulnTech News illustration

Key points

  • PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on October 21, 2026, fix two critical flaws (CVE-2026-109618 and CVE-2026-109619) that can let unauthenticated attackers run code on web servers.
  • Researchers at Calif, Wiz and OpenAI found the flaws with help from AI models, and PHP's own security team used AI to validate reports and exploits before a person worked on every patch.
  • Governments took websites offline as a precaution, including 32 UK government services, Australia's cyber.gov.au and thousands of Nepali government sites.
  • CISA added both flaws to its Known Exploited Vulnerabilities catalog on October 26 and says updating PHP is the only complete fix.

Two critical vulnerabilities in PHP, the language behind a large share of the world’s websites, can let an attacker take over a web server without logging in. PHP released fixes on October 21, 2026, in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35, and told all users to “update immediately.” The flaws, nicknamed PHP2Shell, were found by security researchers working with AI models, and the rush to patch them has taken government websites offline in several countries.

The bugs are tracked as CVE-2026-109618 and CVE-2026-109619. PHP rates both 9.2 out of 10 (critical) on the CVSS v4.0 scale. On October 26, the US Cybersecurity and Infrastructure Security Agency (CISA) added both to its Known Exploited Vulnerabilities catalog, the list of flaws it says attackers are using, and gave US federal agencies until October 29 to deal with them.

What is PHP2Shell?

Both flaws are in PHP itself, not in WordPress, Drupal or any other application built on it. That is why fixing a website’s code or plugins doesn’t help. They involve how PHP cleans up memory when a request fails partway through:

CVEPHP’s name for itWhat goes wrong
CVE-2026-109618RCE via OOM corruptionRunning out of memory can interrupt PHP while internal request data is only partly set up, and the cleanup that follows treats that invalid data as valid
CVE-2026-109619RCE via stale global stateInternal state from one request can survive after its memory has been freed, and a later request handled by the same worker may use it

According to PHP’s advisory, every PHP installation that serves web requests is at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers the risk highest for mod_php, where “an unauthenticated request can trigger the attack before any application code runs.” Wiz, one of the teams that found the bugs, says nearly every PHP version back to PHP 5.4 is affected by at least one of them. Wiz demonstrated its exploits against the latest WordPress, Drupal and Joomla container images, and said the flaws can also let attackers read sensitive server memory, such as passwords, tokens and API keys.

Palo Alto Networks’ Unit 42 said its Cortex Xpanse scans found more than 22.6 million exposed instances potentially vulnerable to the flaws.

How AI helped find the PHP flaws

Three teams reported the bugs to PHP, all with help from AI. According to the PHP Foundation, which pays developers to maintain PHP:

  • Calif, a security firm, began auditing PHP on July 30, 2026, and its researcher Ryan Austin reported a remote code execution flaw on August 11. Calif says it joined OpenAI’s Patch the Planet initiative, which supports open source maintainers, and worked with an AI “audit buddy,” using no models “that weren’t generally available to everyone.” OpenAI says Calif used its GPT-5.6 Sol model.
  • Wiz, the Google-owned cloud security company, reported attack paths on August 24. Wiz says it found its first PHP bug on August 19 using its own Wiz Atlas, Google’s Gemini 4 Argon and OpenAI’s GPT-5.6 Sol, and that the models helped adapt exploits to different PHP versions and configurations.
  • OpenAI independently reported the same root cause, and sent further attack paths on September 18.

AI also helped on the defending side. The PHP Foundation says it added OpenAI’s Daybreak Red tool, which validates reports and exploits, to its security work. Earlier in 2026, the Alpha-Omega project had PHP scanned with Anthropic’s Claude Mythos. “AI helps the team validate reports and group reports sharing the same root cause, but a person makes every call and works on every patch,” the Foundation wrote.

The Foundation also admitted the fix came later than it should have. A PHP core developer had found the first signs of the out-of-memory problem in 2024, while fixing an issue from an earlier audit. The Foundation calls the delay “a structural failure, caused by both the security team’s decision process and its lack of resources,” and is asking companies, hosting providers and governments that depend on PHP to help fund its security work.

A leak forced an early release

PHP had planned to release the fixes on October 22. That changed on October 20 when, according to the Foundation, the two CVE numbers began circulating online at about 15:00 UTC, with a wrong CVSS score of 10.0 but no technical details. PHP published an advance notice that evening and moved the release to October 21 at 14:00 UTC.

The Foundation says Calif then mistakenly published a video showing its proof of concept working against several targets, and copies spread on social media. On the morning of October 21, it says, the container company Chainguard “unilaterally broke the embargo” by publishing images containing the fix more than six hours before the coordinated release.

Government websites taken offline

With details spreading before many servers could be patched, several governments took websites offline as a precaution:

  • United Kingdom: Technology minister Baroness Lloyd of Effra told the House of Lords on October 22 that 32 government services were unavailable and four partly unavailable, The Register reported. She said this “resulted largely from precautionary measures,” and that the government was not aware of “any confirmed compromise of central government systems.”
  • Australia: The Australian Cyber Security Centre’s own website, cyber.gov.au, went offline along with other federal sites, according to iTWire. A spokesperson for Home Affairs Minister Tony Burke told the ABC that “some websites are temporarily unavailable as work is undertaken to mitigate risks arising from this vulnerability.”
  • Nepal: Thousands of government and banking websites were taken down, The Kathmandu Post reported. Most government sites were back online by October 26, after being patched centrally.

Is PHP2Shell being exploited?

CISA’s decision to add both flaws to its Known Exploited Vulnerabilities catalog means it has evidence of attacks, but public details remain limited. Cloudflare says it saw attack traffic targeting its customers, and its firewall rules for the flaws are on by default for free and paid plans. Unit 42 first linked an attack on a European government agency to PHP2Shell, then retracted that on October 25, saying it was “unable to confirm that initial access is associated with the specific PHP2Shell CVEs.”

How to check and fix your PHP version

Run php -v on your server, or check your hosting control panel, and compare your version with this table:

PHP branchFixed inNotes
8.58.5.12
8.48.4.27
8.38.3.36
8.28.2.35PHP 8.2 reaches end of life on December 31, 2026
8.1 and olderNo official releaseAsk your Linux distribution or long-term support vendor for a backport, or upgrade

PHP says Linux distributions and support vendors received the patches in advance, so packaged updates should be available from your vendor. For people building from source, the PHP security team also published minimal fixes for PHP 7.4, 8.0 and 8.1. Restart PHP-FPM or your web server after updating, so no worker keeps running old code.

If you can’t update right away, CISA advises taking affected systems offline until they can be patched, especially anything running PHP 8.1 or older, or using a web application firewall as a stopgap. PHP’s advisory lists temporary settings that block known attack paths, such as setting session.upload_progress.enabled=0 in php.ini and restarting every worker, but warns that they “do not make an installation safe.” In PHP’s words: “There are no complete mitigations, updating is the only safe choice.”

A third, lower-risk bug

On October 23, PHP published an informational advisory about a related flaw, CVE-2026-115560, which also affects the patched releases. PHP says it only occurs under “an unusual combination of configuration and application code,” so it will be fixed in the next regular release rather than an emergency one. Until then, PHP suggests setting session.upload_progress.enabled=0. If you applied that setting as a PHP2Shell mitigation, keep it in place.

What PHP2Shell means for AI and security

PHP2Shell is one of the clearest examples yet of AI models finding serious bugs in software the whole web depends on. The same models are available to attackers, which shortens the time defenders have between disclosure and exploitation. For developers learning to defend servers like these, our guides to the best places to learn cyber security and the SOC analyst roadmap cover the skills involved. For OpenAI’s newest models, see our coverage of ChatGPT’s new features.

We will update this story as PHP, CISA and the researchers publish more details. Follow our security and privacy news for the latest.

Sources

  1. Security advisory: Critical remote code execution vulnerabilities, update now (PHP)
  2. Advance notice of the security release (PHP)
  3. Informational advisory: session upload progress (PHP)
  4. GHSA-w8hw-w9fx-j79w: RCE via OOM corruption (PHP on GitHub)
  5. GHSA-6wmf-4rv5-p3rp: RCE via stale global state (PHP on GitHub)
  6. Today's PHP security release and how we're strengthening PHP security (The PHP Foundation)
  7. Critical Vulnerabilities in PHP Require Immediate Patching (CISA)
  8. Known Exploited Vulnerabilities Catalog (CISA)
  9. PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet (Wiz)
  10. php2shell: A tale of two PHP remote vulnerabilities (Calif)
  11. Patch the Planet: global response coordination as agents uncover critical vulnerabilities (OpenAI)
  12. AI helped discover the PHP vulnerability that could take down 70% of the internet (Fortune)
  13. Threat Brief: Critical Vulnerabilities in PHP (Unit 42, Palo Alto Networks)
  14. Cloudflare deploys protections against php2shell vulnerability (Cloudflare)
  15. PHP2Shell puts dozens of UK government services out of service (The Register)
  16. PHP2Shell: the 14-year-old bugs that pulled cyber.gov.au and government sites worldwide offline (iTWire)
  17. PHP2Shell security flaw forces thousands of Nepali websites offline (The Kathmandu Post)
  18. Most Nepal government websites back online after PHP2Shell flaw (The Kathmandu Post)