PHP2Shell (CVE-2026-109618 and CVE-2026-109619): the AI-assisted PHP flaws, affected versions, patches and early exploitation

PHP2Shell is the name for two critical PHP remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, fixed on October 21, 2026 in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Who found them with AI, which versions are affected, what Amazon says about exploitation, and the stopgaps if you can't patch yet.

Eight glass day tiles with one lit, a bracket spanning four days to a tile with a check, and a dashed last tile, on red and black, titled Four days before

What’s new, in 20 seconds

  1. On October 21, 2026, PHP fixed two critical remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, both rated CVSS v4.0 9.2, in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP says updating is the only complete fix; PHP 8.1 and older get source backports only.
  2. Amazon says it saw a PHP2Shell exploitation attempt on a honeypot on October 17, four days before disclosure, and that PHP2Shell 'is now seeing broad exploitation attempts in the wild,' though it's unclear whether any would have succeeded. The PHP team said pre-patch proof-of-concept exploits it saw were not functional.
  3. The PHP Foundation says Calif and OpenAI reported the root cause on August 11, 2026, and Wiz reported more attack paths on August 24. Calif used OpenAI's GPT-5.6 Sol; Wiz says it used Gemini 4 Argon, GPT-5.6 Sol and its own tools.
Contents

Update, October 23, 2026: Linux's kernel security rules tell anyone who finds a kernel bug with AI to treat it as public. See the Linux kernel disclosure story.

Update, October 23, 2026: PHP published an informational advisory for a separate, related issue, CVE-2026-115560, and suggests keeping session.upload_progress.enabled=0 until its next regular release (see the mitigation section). NVD has scored CVE-2026-109619 8.1 under CVSS v3.1. This story now quotes Amazon's post as it reads on October 23: PHP2Shell "is now seeing broad exploitation attempts in the wild." There have been no new PHP releases since October 21.

PHP2Shell is the name Wiz gave to two critical security flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, which the PHP project fixed on October 21, 2026. Both let an unauthenticated attacker run code on some PHP web servers, and both were found with heavy help from AI models. Amazon says attackers were already probing for them on October 17, four days before the patches shipped.

This story is based on the PHP project's advisory and GitHub security advisories, the PHP Foundation's post, Wiz's research, Amazon's threat-intelligence post and security bulletin, Cloudflare's post, the NVD records, CISA's Known Exploited Vulnerabilities catalog, and reporting by BleepingComputer, The Next Web and Techzine, checked October 22 and re-checked October 23, 2026. How the disclosure was coordinated is the subject of our companion analysis of OpenAI's Patch the Planet framework.

The short version

  • What: two remote code execution bugs in how PHP handles out-of-memory errors and leftover request state.
  • Fixed in: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released October 21, 2026.
  • Severity: CVSS v4.0 9.2 from PHP for both; NVD's own CVSS v3.1 scores are 9.8 for CVE-2026-109618 and 8.1 for CVE-2026-109619; early leaks said 10.0.
  • Exploited: Amazon reports exploitation attempts starting October 17; whether any succeeded is unclear, and how well the early exploits worked is disputed. CISA hadn't listed either CVE as known exploited as of October 23.
  • AI's role: Calif (using OpenAI's GPT-5.6 Sol), OpenAI and Wiz reported the bugs; a human PHP developer first saw signs of one in 2024.

What is PHP2Shell?

Two bugs with a shared root. CVE-2026-109618 ("RCE via OOM corruption"): when PHP runs out of memory, it can be interrupted while request data is only partly set up, and cleanup then treats the invalid data as valid. CVE-2026-109619 ("RCE via stale global state"): state from one request can outlive its memory, and the next request handled by the same worker may use it before it's reset.

PHP's advisories say the first was confirmed as unauthenticated code execution, as the web server's user, against Apache mod_php with default settings; PHP-FPM is "susceptible in principle," and FrankenPHP and LiteSpeed likely are. PHP rates the risk "highest for mod_php." For the second CVE, the strongest case uses PHP 8.5 with fatal_error_backtraces enabled, and a session-handling path was validated against both mod_php and FPM.

Wiz says it used the bugs for pre-authentication code execution against the then-current WordPress, Drupal and Joomla container images, and that "even a simple 'Hello World' application" on an affected version can be vulnerable.

Which PHP versions are affected, and where are the patches?

PHP branchFirst fixed versionStatusSource
8.58.5.12Patched October 21, 2026PHP advisory
8.48.4.27Patched October 21, 2026PHP advisory
8.38.3.36Patched October 21, 2026PHP advisory
8.28.2.35Patched October 21, 2026; branch ends December 31, 2026PHP advisory
8.1, 8.0, 7.4No releaseSource backports on GitHub only; no longer supported by PHPPHP advisory
5.4 to 7.3No releaseAffected per Wiz; no upstream fixWiz; AWS bulletin

Table 1Only the four supported branches got releases; older branches rely on source backports or vendors. Source: PHP security advisory and GHSA-w8hw-w9fx-j79w (October 21, 2026), Wiz, AWS bulletin 2026-143.

Last verified: October 23, 2026

PHP says Linux distributions and long-term-support vendors got the patches in advance, and that distribution builds may carry the fix without changing the upstream version number. Amazon's bulletin 2026-143, last updated October 22, says updated Elastic Beanstalk PHP platform versions are out for PHP 8.2 through 8.5, Amazon Linux packages are out for commercial regions, and Lightsail users must create new instances from updated blueprints. OpenAI published a version checker, openai/php2shell-checker, which reads only version headers; its README warns that "UNKNOWN does not mean the target is patched."

On old branches, PHP links source backports for 7.4, 8.0 and 8.1 "to help people building from source," while Amazon's bulletin says 5.4 through 8.1 have "no upstream fix released": patches exist in the source tree, but no official releases.

Is PHP2Shell being exploited?

Amazon says yes. Its October 21 post by CISO CJ Moses says a MadPot honeypot logged an exploitation attempt on October 17 from a commercial anonymization network, and that it "remains unclear how the actor acquired exploit information prior to disclosure." Proof-of-concept exploits appeared around 02:00 UTC on October 21, and more followed within hours of the patch. "PHP2Shell is now seeing broad exploitation attempts in the wild," Amazon says, adding that its analysis is ongoing and "it's unclear if any of these attempts would have succeeded in real-world systems." CISA hadn't added either CVE to its Known Exploited Vulnerabilities catalog as of October 23, and CISA's October 21 assessment in the CVE records lists exploitation as "none."

The details had leaked first. The PHP Foundation says the CVE IDs appeared online around 15:00 UTC on October 20 with a wrong 10.0 score, so the release was moved up a day; Calif then mistakenly posted a proof-of-concept video that spread. BleepingComputer reported on October 22 that, according to the PHP team, the proof-of-concept exploits published before the patches were not functional.

PHP2Shell from first report to exploitation, 2026

  1. Aug. 11Calif and OpenAI report the out-of-memory root causePHP FoundationConfirmed
  2. Aug. 24Wiz reports further attack pathsPHP Foundation; WizConfirmed
  3. Oct. 17First exploitation attempt on an Amazon honeypotAmazonReported
  4. Oct. 20, ~15:00CVE IDs leak with a wrong 10.0 scorePHP FoundationConfirmed
  5. Oct. 21, 03:02Cloudflare starts WAF protectionsCloudflareConfirmed
  6. Oct. 21, 07:41Chainguard publishes fixed images earlyPHP FoundationConfirmed
  7. Oct. 21PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 releasedPHPConfirmed
  • Confirmed
  • Reported
Figure 1Amazon saw the first exploitation attempt four days before the fixes shipped, and the CVE IDs leaked the day before. Source: PHP Foundation; Amazon; Cloudflare; PHP, as of October 23, 2026.

Cloudflare says it deployed managed WAF rules from 03:02 UTC on October 21, about nine hours before disclosure, including for Free plans, and saw attackers "mutating the attack payload." The PHP Foundation criticized Chainguard for publishing fixed images at 07:41 UTC, before the coordinated release. Chainguard CEO Dan Lorenc told The Register, as relayed by Techzine, that the company found the same bugs with its own AI harness after a researcher tipped it off, and helped test the patches.

How bad is it? Severity claims side by side

ClaimWho says itDate
CVSS v4.0 9.2, critical, attack complexity "high"PHP (CNA)Oct. 21, 2026
CVSS v3.1 9.8 (CVE-2026-109618) and 8.1 (CVE-2026-109619)NVDOct. 21–23, 2026
CVSS 10.0Leaked CVE records; repeated by some researchersOct. 20, 2026
Exploitable "in some cases fairly easily"; every version back to 5.4 affectedWizOct. 21, 2026
"It isn't a Log4J moment"; public PoCs "do not work against a vanilla PHP instance"Elias Taylor (blog)Oct. 21, 2026
"Broad exploitation attempts in the wild"; unclear if any succeededAmazonOct. 21, 2026

Table 2PHP's own score is 9.2 for both CVEs; NVD's scores, the leaked 10.0 and the "no easy exploit" view come from others. Source: NVD and PHP advisories, Wiz, Amazon, eliastaylor.com, PHP Foundation.

Alexandre Daubois of the PHP security team wrote that the panic was right about severity, but that the widely shared session.upload_progress setting only addresses CVE-2026-109619.

How do I patch or mitigate PHP2Shell?

Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your distribution's patched build. PHP says "there are no complete mitigations." If you can't update right away, its advisory lists partial measures:

  • CVE-2026-109618: set memory_limit=-1 (ideally with php_admin_value), cap post_max_size at 8M (32M if you need uploads) with upload_max_filesize below it, and use a container or cgroup memory limit. Don't use RLIMIT_AS or RLIMIT_DATA, which can trigger the bug.
  • CVE-2026-109619: set session.upload_progress.enabled=0 in php.ini or the FPM pool (not ini_set() or .user.ini) and restart every worker; on PHP 8.5 also set fatal_error_backtraces=0.

On October 23, PHP added an informational advisory for a separate issue, CVE-2026-115560, which it calls "an unlikely RCE vector." It needs an unusual setup: an application sets session.serialize_handler to php_binary or php_serialize in its configuration, then switches it to php with ini_set() before session_start(), with session upload progress still enabled. PHP suggests setting session.upload_progress.enabled=0 until its next regular bugfix release; if you applied that setting for CVE-2026-109619, keep it. PHP says it will handle the issue in the regular release cycle and publish a full advisory then, so the October 21 releases aren't described as fixing it.

Amazon adds: consider blocking multipart uploads, look for POST requests containing PHP_SESSION_UPLOAD_PROGRESS, start investigations from October 17, and treat critical internet-facing fixes on hour-scale timelines rather than 7- or 30-day targets. That pressure is growing, as Microsoft's record October Patch Tuesday showed. For the same week's AI supply-chain incident, see our LiteLLM 1.107.0 guide.

Was PHP2Shell really found by AI?

Mostly, with an important human footnote. The PHP Foundation says signs of the out-of-memory bug first surfaced in 2024, when a PHP core developer was fixing an issue from an external audit by Quarkslab arranged through OSTIF; the fix stalled, which the Foundation calls "a structural failure." Calif's researcher, working under OpenAI's Patch the Planet program, and OpenAI reported the root cause on August 11, 2026. OpenAI says Calif used GPT-5.6 Sol. Wiz reported further attack paths on August 24 and says Gemini 4 Argon, GPT-5.6 Sol and its own Wiz Atlas helped with discovery, exploit development and patch validation. The Foundation adds that Alpha-Omega scanned PHP earlier in 2026 with Anthropic's Claude Mythos, the model behind the OSS Scanner. GitHub's advisories credit reporters lcfr-hax, sagitzadik-wiz, tomash-areion and amyb-oai.

AI also cuts the other way: the Foundation says its security team now gets "far more reports than before," more than 100 of them invalid, duplicate or unreproducible since July 1.

What's confirmed, reported and uncertain

  • Confirmed (PHP): the two CVEs, 9.2 scores, fixed versions, affected server setups, mitigations, the October 20 leak, and the October 23 advisory for CVE-2026-115560.
  • Confirmed (NVD, CISA): NVD's 9.8 and 8.1 scores; no KEV listing as of October 23.
  • Confirmed (vendors, about their own actions): Amazon's bulletin and honeypot observations, Cloudflare's rules, OpenAI's checker.
  • Reported: the PHP team's view that pre-patch exploits weren't functional (BleepingComputer); Chainguard's account (Techzine, citing The Register).
  • Uncertain: how the October 17 attacker got exploit details, whether any exploitation attempt succeeded, how many servers have been compromised, and whether PHP-FPM setups can be reliably exploited.

About this story

Based on the sources linked below. How we report: Editorial standards.

Sources · 20

  1. Security advisory: Critical remote code execution vulnerabilities, update now — PHP (October 21, 2026)
  2. Informational advisory: Session upload progress (CVE-2026-115560) — PHP (October 23, 2026)
  3. Known Exploited Vulnerabilities catalog — CISA (checked October 23, 2026)
  4. GHSA-w8hw-w9fx-j79w: RCE via OOM corruption — php/php-src (October 21, 2026)
  5. GHSA-6wmf-4rv5-p3rp: RCE via stale global state — php/php-src (October 21, 2026)
  6. CVE-2026-109618 — NVD
Show all 20 sources
  1. CVE-2026-109619 — NVD
  2. Today's PHP security release, and how we're strengthening PHP security — The PHP Foundation (October 21, 2026)
  3. PHP2Shell: AI uncovers critical RCE in PHP — Wiz (October 21, 2026)
  4. Amazon threat intelligence identifies PHP2Shell exploitation prior to public disclosure — AWS Security Blog (October 21, 2026)
  5. PHP web runtimes (CVE-2026-109618 and CVE-2026-109619), bulletin 2026-143-AWS — AWS (October 21, 2026)
  6. Cloudflare deploys protections against PHP vulnerabilities — Cloudflare (October 21, 2026)
  7. Patch the Planet: global response coordination as agents uncover critical vulnerabilities — OpenAI (October 21, 2026)
  8. openai/php2shell-checker — GitHub
  9. What the PHP2Shell rumors got wrong, from inside the PHP security team — Alexandre Daubois (October 21, 2026)
  10. There isn't an easy exploit for this PHP vulnerability — Elias Taylor (October 21, 2026)
  11. Amazon says PHP2Shell exploitation began 4 days before patches — BleepingComputer (October 22, 2026)
  12. PHP knew about one of the flaws in 2024 but could not agree a fix — The Next Web (October 21, 2026)
  13. PHP accuses Chainguard in PHP2shell — Techzine (October 22, 2026)
  14. Hacker News discussion of the PHP advisory (Tier 3, October 20, 2026)
Written byShajanthan YogeswaranFounder & Editor-in-ChiefMore from Shajanthan
Was this useful?

Read next

Comments (0)

More on Security

View all
Products · NewsArc browser is shutting down on December 22, 2026: how to export your data, moving to Dia, and the alternativesThe Arc browser is shutting down: The Browser Company says Arc stops working on Mac and Windows on December 22, 2026, and account data is deleted within 30 days. How to export your data, what moves to Dia, and which browsers offer vertical tabs and spaces.·7 min read
Research · AnalysisOpenAI agent monitor red team: how METR and Redwood researchers found agents could slip past itAn OpenAI agent monitor red team exercise by one METR and one Redwood Research employee, published October 22, 2026, describes how OpenAI's internal agents could have avoided or broken misalignment monitoring as it stood on July 21. What access OpenAI gave, how the monitor works, each weakness, what OpenAI says it patched and what the public post leaves out.·8 min read
Developers · NewsStorm-0940 and ARTEX: what's confirmed about the ConnectWise Cloud Backup breach, and what the 2,250 Microsoft 365 tenants figure really meansMicrosoft says Storm-0940, a China state-aligned group, was behind the ConnectWise Cloud Backup compromise and used ARTEX, an AI agent framework, to try sign-ins at more than 2,250 Microsoft 365 tenants. That figure counts attempts, not breaches. What Microsoft, ConnectWise, Huntress and others have confirmed, and what to check.·6 min read
Agents · NewsNVIDIA OpenShell: the open-source runtime that sandboxes fleets of AI agents, and what it actually enforcesNVIDIA OpenShell is an Apache 2.0 runtime that runs AI agents such as Claude Code and Codex in sandboxes, checks every network request against a policy and keeps real credentials out of the agent's reach. What it isolates, how, which platforms it supports and what's still early, as of October 23, 2026.·6 min read
The Week in AI · every Friday

Get the cluster, not just the headline.

The week’s biggest stories in AI and tech, what they mean, and what to read next.

Free. One email a week. Unsubscribe in one click.