PHP2Shell: AI-Discovered Critical PHP RCE Vulnerabilities
TECH

PHP2Shell: AI-Discovered Critical PHP RCE Vulnerabilities

42+
Signals

Strategic Overview

  • 01.
    PHP2Shell refers to two critical unauthenticated remote code execution vulnerabilities in core PHP, CVE-2026-109618 and CVE-2026-109619, both rated 9.2 on CVSS v4.0.
  • 02.
    CVE-2026-109618 is an upload-progress unserializer use-after-free, while CVE-2026-109619 is a fatal-error backtrace use-after-free involving OPcache type confusion; both stem from code dating back to PHP 5.4.0.
  • 03.
    The flaws were discovered by Wiz Research on August 19, 2026 using the Wiz Atlas platform together with Google's Gemini 4 Argon and OpenAI's GPT-5.6 Sol models, with AI red-teaming firm Calif independently flagging a related flaw weeks earlier under OpenAI's 'Patch the Planet' initiative.
  • 04.
    Emergency patches shipped October 21, 2026 as PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, after vulnerability details leaked online a day earlier, forcing an accelerated disclosure and prompting several governments to take sites offline as a precaution.

Deep Analysis

Two Decade-Old Memory Bugs, Not a New Design Flaw

PHP2Shell is not one bug but two: CVE-2026-109618, a use-after-free in the upload-progress unserializer, and CVE-2026-109619, a use-after-free tied to OPcache type confusion during fatal-error backtrace generation. Both trace to code written in PHP 5.4.0, meaning the memory-safety flaw sat in one of the internet's most-used language runtimes for roughly a decade before anyone - human or machine - found it [1]. Both carry a CVSS v4.0 score of 9.2, reflecting that a single unauthenticated HTTP request can trigger them before any application code runs, hitting PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, and LiteSpeed deployments alike [4].

What makes the bug class especially dangerous is what happens after PHP's engine is left in a corrupted state by an abnormal request termination - say, an out-of-memory fatal error. Stale pointers and cache entries that should have been cleared can instead be reused, and researchers have compared the resulting memory-disclosure potential, which can leak session cookies out of freed worker memory, to Heartbleed [3]. That comparison matters less for its name-recognition shock value than for what it implies operationally: like Heartbleed, this isn't a bug you can fully neutralize with a web application firewall, because the vulnerable code path executes inside PHP itself, ahead of any filtering logic.

AI Found It First - and the Credit Fight That Followed

The headline framing of PHP2Shell is that frontier AI discovered a historically severe vulnerability before attackers did. Wiz Research used its Atlas platform paired with Google's Gemini 4 Argon and OpenAI's GPT-5.6 Sol to find and confirm both CVEs on August 19, 2026 [1]. Separately, AI red-teaming firm Calif had already surfaced a related flaw around August 1 using GPT-5.6 Sol as part of OpenAI's 'Patch the Planet' coalition [6]. The speed claim behind this framing is striking: according to reporting on the episode, a single researcher using these AI tools reportedly accomplished in about a week what would otherwise have taken a world-class security team months [7].

But the discovery story has rough edges that complicate a clean 'AI saves the day' narrative. Cloudflare's own account credited a fourth organization, Quarkslab, as part of the discovery and disclosure effort - a credit that was notably absent from OpenAI's own version of events [6]. And OpenAI's own public statement on the episode is itself an admission of dual-use risk: the same capability that let Calif and Wiz find a buried, decade-old bug could just as easily help attackers assemble offensive exploit tooling faster than before [5]. TJ Sayers of the Center for Internet Security put it plainly: the episode shows AI can uncover buried flaws and turn complex exploit chains into practical attacks in the same breath [5].

An Embargo Leak Turned an Orderly Rollout Into a Scramble

PHP2Shell was supposed to be a textbook coordinated disclosure: Wiz reported the bugs on August 24, the PHP security team acknowledged them on September 21, and a release was being quietly prepared. That plan broke on October 20, 2026, when details leaked online before the embargo lifted, forcing the PHP project to rush out a pre-announcement and compress its originally planned release timeline [2]. Cloudflare didn't wait for the leak to resolve itself - it pushed WAF protections for the known exploit vectors to customers at 03:02 UTC on October 21, hours before PHP's official patch landed at 13:30 UTC [6].

That gap between leak and patch was not purely theoretical. Cloudflare reported observing early attack attempts around 07:43 UTC, meaning exploitation activity began roughly six hours before a fix was even available [3]. Not every security vendor saw the same urgency, however: Huntress reported that, as of October 20, it had not observed confirmed exploitation in its monitored partner environments and had not built or reproduced a working proof of concept [2]. That split between 'attacks are already happening' and 'we haven't confirmed it yet' is a familiar pattern in fast-moving disclosures, and it's part of why multiple governments chose to take sites offline pre-emptively rather than wait for certainty.

70% of the Web Is a Statistic; Patching It Is a Logistics Problem

The numbers behind PHP2Shell are what pushed it from a technical advisory into government-shutdown territory: PHP powers an estimated 70% of websites worldwide, Palo Alto Networks identified roughly 22.6 million vulnerable instances, and 40% of all websites run WordPress, which sits on top of PHP [5]. Confirmed or claimed affected software spans Magento, WordPress, Drupal, Joomla, MediaWiki, Roundcube, phpMyAdmin, Nextcloud, Laravel, Symfony, and WHMCS - in other words, most of the CMS and self-hosted application ecosystem [3]. Public bodies in the Netherlands, Finland, France, and Denmark took government portals, health services, and school communication platforms offline rather than risk exposure while patches rolled out [1].

The less glamorous part of the story is that having a patch does not mean the patch reaches every vulnerable server quickly. PHP 8.1 and earlier versions are end-of-life and received no official fix at all, leaving operators of older installations with no upgrade path except migrating to a supported branch. That gap between a patch existing and a patch actually being applied everywhere, more than the CVSS score itself, is what determines how long the 70% of the web running PHP stays exposed.

Historical Context

2026-08-01
Calif discovered a related critical PHP flaw using GPT-5.6 Sol as part of OpenAI's Patch the Planet initiative.
2026-08-19
Wiz independently discovered and confirmed RCE for the two PHP vulnerabilities using Wiz Atlas, Gemini 4 Argon, and GPT-5.6 Sol.
2026-08-24
Wiz reported the vulnerabilities to the PHP security team.
2026-09-21
PHP project acknowledged the vulnerability reports.
2026-10-20
Details of the vulnerabilities leaked online ahead of coordinated disclosure, prompting the PHP project to pre-announce the upcoming security release.
2026-10-21
Cloudflare deployed WAF protections at 03:02 UTC, early attacks were observed at 07:43 UTC, official PHP patches shipped at 13:30 UTC, and governments in the Netherlands, Finland, Denmark, and France took sites offline.

Power Map

Key Players
Subject

PHP2Shell: AI-Discovered Critical PHP RCE Vulnerabilities

WI

Wiz Research

Discovered the PHP2Shell flaws on August 19, 2026 using Wiz Atlas, Gemini 4 Argon, and GPT-5.6 Sol, and reported them to the PHP security team on August 24, 2026.

OP

OpenAI

Ran the 'Patch the Planet' coalition initiative whose GPT-5.6 Sol model was used by both Calif and Wiz to find the flaws, and committed $1 billion in subsidized Daybreak access for under-resourced open-source security efforts.

PH

PHP Foundation / PHP security team

Acknowledged the vulnerability reports on September 21, 2026, pre-announced the security release after the leak, and shipped emergency patches on October 21, 2026 at 13:30 UTC.

CL

Cloudflare

Deployed WAF protections against known PHP2Shell exploit vectors between 03:02 and 07:43 UTC on October 21, ahead of the official patch, and reported early in-the-wild attack attempts.

CA

Calif

AI red-teaming firm that independently identified a related critical flaw around August 1, 2026 using GPT-5.6 Sol as part of OpenAI's Patch the Planet initiative.

GO

Governments of the Netherlands, Finland, Denmark, and France

Took public-sector websites offline or urged immediate remediation as a precaution following disclosure.

Fact Check

7 cited
  1. [1] PHP2Shell: PHP RCE Vulnerabilities
  2. [2] PHP2Shell: Two Unpatched Critical PHP Vulnerabilities
  3. [3] PHP2Shell Research
  4. [4] PHP2Shell PHP Vulnerabilities Patched (CVE-2026-109618, CVE-2026-109619)
  5. [5] AI Tools Discovered the PHP Vulnerability That Could Take Down 70% of the Internet
  6. [6] OpenAI Says GPT-5.6 Sol Found a PHP Flaw Before Attackers Did
  7. [7] AI Tools Discovered PHP Vulnerability

Source Articles

Top 5

THE SIGNAL.

Analysts

“Considers PHP2Shell likely to cause a wave of real-world security incidents given PHP's ubiquity across the web.”

Kevin Beaumont (independent security researcher)
Warns of severe downstream impact

“Highlights that Cloudflare pre-positioned WAF rules for known exploit vectors ahead of public exploitation.”

Dane Knecht (Cloudflare CTO)
Defensive mitigation framing

“Emphasizes that the vulnerabilities expose a massive number of websites to immediate attacks if left unpatched.”

Gang Wang (University of Illinois)
Assesses scale of risk

“Frames PHP2Shell as proof that AI can both uncover long-buried flaws and turn complex exploit chains into practical attacks.”

TJ Sayers (Center for Internet Security)
Notes the dual-use nature of AI in this episode

“Frames the discovery as evidence that frontier AI changes the balance of power in cyber defense.”

Raluca Ada Popa (Head of Gemini Security, Google DeepMind)
AI capability advocate
The Crowd

“The PHP security team is giving advance notice: Upcoming security release Wed, Oct 21st 2026, 14:00UTC, two critical vulnerabilities, both rated CVSSv4 9.2. PHP users are encouraged to prepare to update. Earlier release if details become public or active exploit evidence.”

@@ThePHPF18057

“So basically, today PHP got two critical bugs that let anyone run code on your server without even logging in, which is bad, and then the details leaked before the patch was even out, which is worse, and it works on WordPress and MediaWiki and Magento and Joomla and Laravel, and Censys says like 1.5 million servers are running a version with no fix, so the NSA was like "take your system offline," and the FBI was like "take your system offline," and CISA and the UK and CERT-EU were all like "take your system offline," and then the Prime Minister of Japan, the actual Prime Minister, posted at 5:55 in the morning telling 48.8 million people to take their system offline, so everyone took their system offline, like the Dutch cybersecurity agency took its own website offline, and the Dutch parliament went offline, and the Port of Rotterdam went offline, and Finland and France and Denmark started pulling government sites, and Wikipedia went down, and Archive.org went down, and Asana and GOG and Something Awful went down, and the University of Vienna's webmail went down for some reason, and that's just PHP. Anyway, it's Wednesday.”

@@fiveoutofnine23012

“Vulnerability alert: php2shell. Unpatched sites running PHP 5.4 or later are at risk of remote code execution, data exposure, and crashes. If your site's web traffic is proxied through Cloudflare, we deployed protections before official public disclosure. Check the blog post to see which mitigations are enabled by default. Even with these mitigations in place, update PHP as soon as possible to fix the underlying vulnerabilities.”

@@CloudflareDev2151

“PHP warns it plans to release 2 emergency patches imminently. Unconfirmed report claims PHP2Shell exploit remotely executes code on PHP sites.”

@u/shiruken796
Broadcast
'This Is A Bad One': Experts Discover Weakness On Websites That Has Been Hidden For 10+ Years

'This Is A Bad One': Experts Discover Weakness On Websites That Has Been Hidden For 10+ Years

70% of the internet is about to get hacked

70% of the internet is about to get hacked

PHP2Shell: What We Know Before the 14:00 UTC Patch

PHP2Shell: What We Know Before the 14:00 UTC Patch