Skip to content
AI EmployeeSuper-AgentsAgent-to-AgentBenchmarksPricingBlog

PHP2Shell: How AI Found Two Critical PHP Flaws

At a glanceQuick answers
What happened?
PHP released four security updates on October 21, 2026 for two critical flaws in the PHP engine that frontier AI helped find.
Who is at risk?
PHP says all installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, with mod_php at highest risk.
What should I do?
Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or get a backport from your distributor for older branches.
Data illustration on a near-white ground: a teal shield catches an amber bug in front of a long row of grey server icons, beside the large figure 9.2 and the lines CVSS v4.0, two critical PHP flaws, and 4 fixed releases
Fig 0Two critical flaws, one score, four fixed releases. Made by CellCog's image agent, running GPT Image 2.5.

PHP shipped four security releases on October 21, 2026, fixing two critical flaws that can let an attacker run code on a web server without logging in. OpenAI says researchers at Calif found one of them with GPT-5.6 Sol under its Patch the Planet program, and that Wiz independently found and reported both. PHP’s own advisory is blunt: “All PHP users are strongly encouraged to update immediately.”

This page reads OpenAI’s disclosure post, PHP’s security advisory and release notes, the two GitHub advisories (CVE-2026-109618, CVE-2026-109619) and Wiz’s research write-up.

On this page · 8 sectionsOpen
  1. What to update
  2. What actually broke
  3. Two months between an AI find and a fix
  4. What OpenAI is proposing
  5. What it means for teams running PHP
  6. What Altman said the same day
  7. Exploit attempts, but no confirmed break-ins
  8. What to watch
Key points5 · 7 min full read
  1. A teal elephant inside code brackets with an amber crack.
    PHP fixed two critical flaws, CVE-2026-109618 and CVE-2026-109619, both rated 9.2 on CVSS v4.0, that can allow unauthenticated remote code execution.
  2. Four stacked tags with check marks.
    The fixed releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, published October 21, 2026; PHP says updating is the only complete fix.
  3. Two chips pointing at one amber bug.
    OpenAI says Calif found one flaw with GPT-5.6 Sol, and Wiz independently found and reported both using Gemini 4 Argon and GPT-5.6 Sol.
  4. A calendar with an arrow between two marked days.
    Wiz found the first bug on August 19 and reported it on August 24; the fix took two months of coordination before release.
  5. An upward arrow over a server stack.
    OpenAI committed $1 billion in subsidized Daybreak access for defenders and expects similar findings to increase sharply in the coming months.

§ 01What to update

Branch Vulnerable Fixed release
PHP 8.5 before 8.5.12 8.5.12
PHP 8.4 before 8.4.27 8.4.27
PHP 8.3 before 8.3.36 8.3.36
PHP 8.2 before 8.2.35 8.2.35
Table 1Fixed PHP releases for both CVEs, October 21, 2026

Both flaws score 9.2 on CVSS v4.0 in PHP’s advisories. PHP lists PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed as at risk. “We consider the risk highest for mod_php, with a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs.” And on workarounds: “There are no complete mitigations, updating is the only safe choice.”

Older branches matter too. Wiz says every PHP version released in the last decade is affected by at least one of the bugs, going back to PHP 5.4. Those branches get no fix from PHP itself, so the path is a distributor’s backport or an upgrade. OpenAI names Wiz and Cloudflare among the partners that prepared protections ahead of disclosure, and it published a PHP version checker.

§ 02What actually broke

Both bugs come from how PHP handles a fatal error in the middle of a request, most often running out of memory.

  • CVE-2026-109618, RCE via OOM corruption. PHP aborts on an out-of-memory error by jumping out of the current context. If that happens while request memory is reachable but not yet initialized, shutdown later reads invalid state. The advisory lists multipart upload tricks that reach the memory limit while staying inside PHP’s size limits, and Apache mod_php runs that shutdown even when startup failed, before any application code.
  • CVE-2026-109619, RCE via stale global state. A worker keeps global pointers into memory owned by one request. If the request is cut short, the memory is freed but the pointer stays, and the next request on the same worker reads it before setup resets it: a use after free.

Wiz demonstrated pre-authentication code execution on WordPress, Drupal and Joomla, plus remote disclosure of worker memory that can hold passwords, tokens and API keys. The targets were examples; the bug lives in PHP, not in the apps.

Animation: request A fills a PHP worker's memory, an out-of-memory error frees it while a pointer in worker globals stays, request B follows the stale pointer and code runs, then the patch resets the pointer first
Fig 1One request dies out of memory; the next request on that worker reads its stale pointer

§ 03Two months between an AI find and a fix

From an AI-found bug to four PHP releases, 2026Timeline: Wiz finds the first bug with AI on Aug 19, reports it to PHP Aug 24, PHP begins a coordinated fix Sep 21, PHP gives advance notice Oct 20, fixed releases ship Oct 21 at 14:00 UTC, highlightedAug 19Wiz finds first bug with AIAug 24Reported to PHPSep 21PHP starts the fixOct 20PHP advance noticeOct 21, 14:00 UTCFixed releases shipFrom an AI-found bug to four PHP releases, 2026Timeline: Wiz finds the first bug with AI on Aug 19, reports it to PHP Aug 24, PHP begins a coordinated fix Sep 21, PHP gives advance notice Oct 20, fixed releases ship Oct 21 at 14:00 UTC, highlightedAug 19Wiz finds first bug with AIAug 24Reported to PHPSep 21PHP starts the fixOct 20PHP advance noticeOct 21, 14:00 UTCFixed releases ship
Fig 2From an AI-found bug to four PHP releases, 2026

That gap is what OpenAI calls the Defender’s Window: “To our knowledge, frontier AI found these vulnerabilities before attackers did.” Wiz is specific about the models. It used Gemini 4 Argon and GPT-5.6 Sol throughout, and says Gemini 4 Argon contributed to finding the bug, building exploits, detecting attacks and validating the patch.

Animation: a timeline from Aug 19, found with AI, to Oct 21, four fixed releases; a teal band labelled defender's window spans the gap and Oct 21 turns amber, labelled public
Fig 3AI found the bug on August 19; the public fix shipped on October 21

The window narrowed at the end. PHP’s October 20 notice scheduled the release for 14:00 UTC the next day and reserved the right to release earlier “should details of either vulnerability become public”. Security firm Huntress reported that details had leaked ahead of the planned disclosure. The Dutch national cyber center NCSC-NL tells operators to update and to watch for public exploit activity.

§ 04What OpenAI is proposing

OpenAI used the disclosure to lay out a response process for AI-found bugs in widely used software.

  • Money and access. $1 billion in subsidized Daybreak access through Daybreak for Frontline Defenders, aimed at organizations with limited security resources.
  • Tools. The PHP version checker now, and a Codex skill to help operators find vulnerable versions, coming.
  • Process. Five stages: fix upstream with adversarial testing by frontier models, give affected organizations time, involve government partners, prepare downstream updates, then publish guidance. For PHP it engaged the White House’s Super Intelligence Force, the Office of the National Cyber Director and CISA.
  • A forecast. “We expect similar findings to increase sharply in the coming months.”

It also asks an open question many operators will dislike: whether governments should ever use a vulnerability to patch systems they manage “after losing administrative access”.

§ 05What it means for teams running PHP

Check the PHP version on every server you own, including shared hosting and old side projects, and update or ask your host which release you are on. For agencies and small teams, the harder part is the inventory: a forgotten WordPress install on PHP 7 has no fix from PHP.

The bigger signal is the pace. Two frontier labs’ models are credited on one internet-scale bug, and OpenAI says more are already in the queue.

§ 06What Altman said the same day

The same day PHP shipped its fixes, Sam Altman went further at Stanford Graduate School of Business’s View From The Top series (video, uploaded October 21, 2026). Asked what leaders can do to prepare for AI’s risks, he picked cybersecurity: “I don’t even know what a dramatic enough word to use”.

He said the scare earlier this year got people to patch some bugs, but most leaders then moved on while the models kept improving, and that models can find “bugs that are outside of the normal threat model of what we think a hacker can do” including “hardware-level insane stuff”. His conclusion: “I no longer think we’re going to be able to just patch all the bugs.” Instead, defenders will have to use the same technology “for sort of a new kind of defense shield”.

That is the argument behind OpenAI’s proposal above, said plainly by its CEO: patching one find at a time does not keep up when finds arrive faster than fixes.

§ 07Exploit attempts, but no confirmed break-ins

Update, October 25: attackers moved fast, but the reports so far count attempts, not successful compromises.

  • Before the fix shipped. Amazon Threat Intelligence found an exploit attempt in its MadPot honeypots dated October 17, four days before public disclosure, and says “PHP2Shell is now seeing broad exploitation attempts in the wild.” It tells teams to investigate from October 17, not from the disclosure date.
  • Cloudflare’s network. CEO Matthew Prince posted at 01:25 UTC on October 22 that Cloudflare saw thousands of attempts in the 10 hours before the announcement, tens of thousands in the 45 minutes after, hundreds of thousands within 2 hours and millions by the time he posted. Those are rounded counts of attempts.
  • A corrected report. Sophos first reported successful exploitation in customer environments, then corrected it at 21:21 UTC on October 22: its telemetry showed scanning and a small number of failed attempts, with no evidence of a successful compromise. The blocked payload was a likely Mirai botnet variant.
  • No KEV listing yet. Neither CVE-2026-109618 nor CVE-2026-109619 is in CISA’s Known Exploited Vulnerabilities catalog as of its October 23 release.

For operators the advice does not change, it just got more urgent: patch, and check logs from October 17 onward.

§ 08What to watch

  • A confirmed successful compromise, or CISA adding either CVE to its Known Exploited Vulnerabilities catalog.
  • OpenAI’s Codex skill for PHP version checks.
  • Backports from Linux distributions and hosts for PHP 8.1 and older.
Frequently asked5 questions

Q1What is PHP2Shell?

PHP2Shell is the name Wiz gave two critical PHP engine flaws, CVE-2026-109618 and CVE-2026-109619, that can let an attacker run code on a server without logging in.

Q2Which PHP versions fix PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released October 21, 2026. Every earlier release on those branches is affected.

Q3Which AI models found the PHP vulnerabilities?

OpenAI says Calif found one flaw with GPT-5.6 Sol. Wiz says it used Gemini 4 Argon and GPT-5.6 Sol to find the bugs, build exploits and validate the patch.

Q4Is there a workaround if I cannot update PHP?

PHP says there are no complete mitigations and updating is the only safe choice. Security vendors shipped interim protections, such as firewall rules, for teams that need time.

Q5Can an AI employee keep my servers patched?

A CellCog AI software engineer can check which PHP version each server runs, prepare and test the upgrade, and leave every deploy for your approval.

Published 21 October 2026 Last reviewed 25 October 2026 All Trust, permissions & security →