Skip to main content
Research Note Security & Adversarial AI

PHP2Shell: AI Helped Turn an Old PHP Bug Into a Working Exploit

October 23, 2026 · 10 min read

PHP2Shell is two critical bugs in the PHP runtime itself that can let an attacker run code on a server without logging in. The out-of-memory bug at its root wasn’t a secret. Calif traces it to a PHP bug report from 2020.1 The PHP Foundation says the first signs of it turned up in 2024, while an issue from a Quarkslab audit was being fixed, and that an exploit was “theorized, but no concrete vectors were found.”2 This year Calif, OpenAI and Wiz each reported it to PHP, and Calif and Wiz say they built working exploits.234 Wiz, OpenAI and Google credit frontier AI models with a major part of that work. Calif, which OpenAI credits with the find, puts its human researcher first.

Patching is the urgent part this week. The credit fight is the part worth watching after that, because it’s an early, public argument about how much of exploit development models now do. An out-of-memory issue known for years wasn’t proven exploitable until 2026. If models are shrinking the distance between “known weird bug” and “working exploit,” that shortcut is open to attackers as well as defenders.

TL;DR
  • Patch now. Two critical bugs in the core PHP runtime, CVE-2026-109618 and CVE-2026-109619, are fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released Oct 21.
  • Cloudflare’s CEO cited millions of exploitation attempts, but no successful compromise has been publicly confirmed. As of Oct 23 at 1:30 PM CT, neither CVE is on CISA’s list of bugs it has confirmed are being exploited.
  • AI was part of the research, and how much is disputed. Wiz, OpenAI and Google credit frontier models. Calif says its first find used only generally available models and its researcher’s knowledge of the target.
The story in under a minute. Narration is a synthetic voice; captions are available.

What We Know

Two runtime bugs, two scores

The fixes landed on October 21 in all four supported branches.567 Both bugs are in the PHP runtime, not in a framework or an app. The PHP Group, the CVE Numbering Authority (CNA) for PHP, titles CVE-2026-109618 “RCE via OOM corruption” and CVE-2026-109619 “RCE via stale global state”. Remote code execution (RCE) means an attacker runs their own code on your server. Both are memory-safety bugs, including use after free (CWE-416).67

Each CVE carries two critical scores on CVSS, the standard severity scale, and you’ll see both quoted:

ScorerCVSS versionScore
PHP Group (the CNA)4.09.2 Critical
NIST’s NVD3.19.8 Critical

The 9.2 in most headlines is the PHP Group’s score. NVD’s 9.8 uses the older CVSS 3.1. Both scores say an attacker needs no login and no user action. They differ on difficulty: NVD rates the attack easy, while the PHP Group rates it hard and dependent on conditions.67

The CVE records list only the supported branches as affected: 8.2 before 8.2.35, 8.3 before 8.3.36, 8.4 before 8.4.27 and 8.5 before 8.5.12. Wiz and Calif go further. Wiz says “every PHP version released in the last decade is affected by at least one of these vulnerabilities, going back to version 5.4,” and Calif says “the earliest affected path we found dates to PHP 5.4.0.”41 That claim is theirs, not the CVE records’. The fixes cover only the four supported branches, and CISA tells anyone still on PHP 8.1 or older to take PHP-based systems offline until they’re updated.8

The advisory for CVE-2026-109618 says remote code execution was “validated over HTTP against mod_php with default PHP input and memory limits.” That’s mod_php (PHP running inside Apache). For PHP-FPM (PHP’s separate process manager, common behind Nginx), it says “no complete FPM exploit has been demonstrated.”9 Wiz researcher Sagi Tzadik claims pre-auth RCE in WordPress, Drupal and Joomla.10

Attempts are confirmed. Compromises are not.

Several companies report exploitation attempts:

  • Cloudflare says it “observed attack traffic targeting our customers,” and that attackers changed their payloads to try to get past its web application firewall (WAF). Its default WAF rules have been live since Oct 20 at 10:02 PM CT.11
  • Cloudflare CEO Matthew Prince posted on Oct 21 that there were “thousands of attempts” in the 10 hours before the announcement, and “millions now.”12
  • watchTowr says it is “observing active exploitation attempts of both” CVEs.13 Per SecurityWeek, watchTowr’s Jake Knott said the circulating exploits “either don’t work at all, test for timing-based differences, or crash the target.”14
  • Amazon says its MadPot honeypots logged a first attempt on Oct 17, four days before disclosure, and that more proofs of concept appeared within hours of the patch. It also says it’s “unclear if any of these attempts would have succeeded in real-world systems.”15 SecurityWeek reports that the organizations reporting activity said the attempts were unsuccessful.14
  • Hadrian calls the bugs “exploited in the wild at scale,” but names no victim and gives no evidence that an attempt succeeded.16

The official picture is quieter. The PHP Foundation says its team “did not identify any functional exploits at the time of release/public disclosure.”2 CISA’s Oct 21 alert says “CISA has not observed exploitation of these vulnerabilities as of the time of publication,” and still said so on Oct 23.8 The CISA-ADP assessment on both CVE records, dated Oct 21, lists exploitation as “none.”17 CISA’s Known Exploited Vulnerabilities (KEV) catalog, the US government’s list of bugs it has confirmed are being exploited, didn’t include either CVE as of 1:30 PM CT on Oct 23.18

The disclosure itself went messily. The PHP Foundation says Chainguard broke the embargo at 2:41 AM CT on Oct 21, and that Calif “mistakenly published a video” after a pre-announcement leak, which “contributed to accelerated development of various PoCs,” or proofs of concept, demo exploit code.2

Europe went offline as a precaution

The Dutch government took sites including Overheid.nl, MijnOverheid.nl and DigiD offline on Oct 21 “uit voorzorg” (as a precaution), and said there were “nog geen signalen dat de kwetsbaarheden actief misbruikt worden” (no signs yet that the vulnerabilities are being actively abused).19 Finland’s Valtori took services offline “as a precautionary move,” per Yle.20 Sky News reported similar steps in France, Denmark and Czechia; I haven’t seen those governments’ own statements.21 A joint statement from ENISA, CERT-EU, DG CNECT, Europol’s EC3 and the CSIRTs network advises isolating exposed applications that can’t be patched, and reports no compromise.22 The primary statements describe precautions, not attacks.

Who found it, and what AI did

Date (2026)Event
Jul 30Calif starts its PHP audit1
Aug 1Calif finds the bug; on Aug 5 its researcher, @lcfr_hax, posts a hash of the finding1
Aug 11Calif reports an unconditional RCE to PHP. OpenAI independently reports the same root cause the same day2
Aug 19Wiz finds its first vulnerability, and reports to PHP on Aug 244
Sep 18OpenAI reports further attack vectors2
Oct 21Disclosure, patches and the CVEs5
  • Wiz: “We used Wiz Atlas, Gemini 4 Argon and GPT-5.6 Sol throughout this research,” and frontier models “were critical to making this process practical, enabling us to develop and adapt working exploits across multiple applications in hours.”4
  • OpenAI: “Calif identified a critical flaw using GPT-5.6 Sol as part of our Patch the Planet initiative, with Wiz also independently discovering and reporting both vulnerabilities.” And: “To our knowledge, frontier AI found these vulnerabilities before attackers did.”23
  • Google: “Gemini 4 Argon made an invaluable contribution to finding the vulnerability, exploit development, attack detection, and validation of the patch.”24
  • Calif: “No special harness, or access to models that weren’t generally available to everyone were used in the initial bug discovery.” And: “‘know your target’ is still as applicable as ever, even in the LLM dominated VR age. No model is simply capable of unearthing ‘all bugs’ with simple prompts.”1 On X, Calif says “@lcfr_hax was the first to discover php2shell and develop a working exploit.”3 watchTowr credits Calif and @lcfr_hax with the discovery.25

The PHP Foundation thanks “OpenAI Codex Security, especially Amy Burnett.”2 The PHP advisories’ credits list only GitHub handles and say nothing about AI.926

These accounts mostly describe different steps. Calif’s is about the first discovery, which it says came from a researcher who knew the target, using models anyone can access. Wiz’s is about turning a flaw into working exploits across applications, which it says models compressed into hours. OpenAI’s and Google’s are about their own models’ part in that work. The record supports “models were in the loop for every team that has described its method.” It doesn’t support “a model found the bug on its own.” The strongest versions are OpenAI’s “frontier AI found these vulnerabilities” and Wiz’s headline, “AI uncovers critical RCE vulnerabilities,” and both describe researchers using models.

What to Do

  1. Upgrade PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35. The advisory says updating “is the only complete mitigation.”9
  2. Start with mod_php, where remote code execution was validated. Don’t read the FPM line as a pass: “no complete FPM exploit has been demonstrated” isn’t the same as “not exploitable.”9
  3. If you’re on PHP 8.1 or older, or can’t patch yet, CISA says to take PHP-based systems offline until they’re updated.8 The EU joint statement advises isolating exposed applications.22 Some distributions patch their own older packages: Ubuntu 22.04’s php8.1 is fixed in USN-8948-1, so check your vendor’s notice too.27
  4. Use WAF rules to buy time, not as the fix. Cloudflare’s default rules have been on since Oct 20, and it has already seen attackers change payloads to try to get around them.11

Open Questions

  • Will CISA add either CVE to KEV, and on what evidence?
  • Did any attempt succeed? Hadrian describes broad exploitation and Amazon broad exploitation attempts, but no one has named a victim.
  • What exactly did GPT-5.6 Sol do in Calif’s find? OpenAI says Calif identified the flaw using it; Calif’s own account leads with its researcher and generally available models.
  • How much did the early leak, and Calif’s mistakenly published video, speed up the public proofs of concept?
  • Is there a working exploit for PHP-FPM?
  • Are PHP 5.4 through 8.1 affected, as Wiz and Calif say, and are they exploitable in practice? How many of those servers are still online?

Next Steps

I’m watching the KEV catalog and CISA’s alert, and I’ll update this note if either CVE is added or a confirmed compromise is reported.

Angles I might be missing: if you run PHP in production and have seen an attempt get further than a crash, or have tested the circulating exploits against PHP-FPM, I’d like to hear what you found.

Footnotes

  1. Calif Research, “php2shell,” including its timeline. https://calif.io/php2shell/ ↩ ↩2 ↩3 ↩4 ↩5

  2. The PHP Foundation, “Today’s PHP Security Release, and How We’re Strengthening PHP Security,” October 21, 2026. https://thephp.foundation/blog/2026/10/21/todays-php-security-release-and-how-were-strengthening-php-security/ ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7

  3. Calif on X, October 21, 2026. https://x.com/calif_io/status/2112914613297668583 ↩ ↩2

  4. Wiz, “PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet,” October 21, 2026. https://www.wiz.io/blog/php2shell-php-rce ↩ ↩2 ↩3 ↩4

  5. php.net on X, PHP 8.5.12 release post, October 21, 2026. https://x.com/php_net/status/2112901727028379908 ↩ ↩2

  6. NIST National Vulnerability Database, CVE-2026-109618. https://nvd.nist.gov/vuln/detail/CVE-2026-109618 ↩ ↩2 ↩3

  7. NIST National Vulnerability Database, CVE-2026-109619. https://nvd.nist.gov/vuln/detail/CVE-2026-109619 ↩ ↩2 ↩3

  8. CISA, “Critical Vulnerabilities in PHP Require Immediate Patching,” alert, October 21, 2026. https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching ↩ ↩2 ↩3

  9. PHP security advisory GHSA-w8hw-w9fx-j79w (CVE-2026-109618). https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w ↩ ↩2 ↩3 ↩4

  10. Sagi Tzadik (Wiz Research) on X, October 21, 2026. https://x.com/sagitz_/status/2112901380080058778 ↩

  11. Cloudflare, “Cloudflare deploys protections against php2shell vulnerability,” October 2026. https://blog.cloudflare.com/php-vulnerabilities-waf-protection/ ↩ ↩2

  12. Matthew Prince on X, October 21, 2026. https://x.com/eastdakota/status/2113079352682570051 ↩

  13. watchTowr, PHP2Shell intelligence page, October 2026. https://watchtowr.com/intelligence/php-remote-code-execution-php2shell/ ↩

  14. SecurityWeek, report on PHP2Shell exploitation before the patches, October 22, 2026. https://www.securityweek.com/php2shell-exploitation-started-days-before-patches/ ↩ ↩2

  15. CJ Moses, “Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure in MadPot,” AWS Security Blog, October 21, 2026. https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/ ↩

  16. Hadrian, “php2shell: Leaked critical PHP RCEs (CVE-2026-109618, -109619).” https://hadrian.io/vulnerability-alerts/php2shell-leaked-critical-php-rce-cve-2026-109618-cve-2026-109619 ↩

  17. CVE.org records for CVE-2026-109618 and CVE-2026-109619, including the CISA-ADP SSVC assessment dated October 21, 2026. https://www.cve.org/CVERecord?id=CVE-2026-109618 and https://www.cve.org/CVERecord?id=CVE-2026-109619 ↩

  18. CISA, Known Exploited Vulnerabilities catalog, JSON feed, catalog version 2026.10.23 (1,755 entries), checked October 23, 2026 at 1:30 PM CT. https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json ↩

  19. Rijksoverheid, “Aantal websites Rijksoverheid preventief offline na kwetsbaarheden PHP,” October 21, 2026. https://www.rijksoverheid.nl/actueel/nieuws/2026/10/21/aantal-websites-rijksoverheid-preventief-offline-na-kwetsbaarheden-php ↩

  20. Yle, “Finland temporarily shuts down government websites as a precaution for critical vulnerabilities,” October 2026. https://yle.fi/a/74-20252600 ↩

  21. Sky News, report on warnings to install the PHP update or go offline, October 2026. https://news.sky.com/story/websites-warned-to-install-critical-php-software-update-or-go-offline-13601917 ↩

  22. ENISA, CERT-EU, DG CNECT, Europol EC3 and the CSIRTs network, “Joint statement on critical PHP vulnerabilities,” October 21, 2026. https://www.enisa.europa.eu/news/joint-statement-on-critical-php-vulnerabilities ↩ ↩2

  23. OpenAI, coordinated disclosure post on the PHP vulnerabilities, October 21, 2026. https://openai.com/index/coordinated-disclosure-of-critical-vulnerabilities ↩

  24. Chris Betz and Raluca Ada Popa, “Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619,” Google Cloud blog, October 21, 2026. https://cloud.google.com/blog/products/identity-security/responding-to-core-php-vulnerabilities-cve-2026-109618-cve-2026-109619 ↩

  25. watchTowr on X, October 21, 2026. https://x.com/watchtowrcyber/status/2112923764270768398 ↩

  26. PHP security advisory GHSA-6wmf-4rv5-p3rp (CVE-2026-109619). https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp ↩

  27. Ubuntu, “USN-8948-1: PHP vulnerabilities,” October 21, 2026. https://ubuntu.com/security/notices/USN-8948-1 ↩

Researched & generated by AI

Edited & supervised by Evan Musick ↗

Researched, drafted, and fact-checked by an AI agent pipeline, then reviewed, edited, and approved by Evan Musick before publishing.

How the pipeline works →