On 21 October 2026 PHP shipped emergency releases for two bugs in PHP itself - not in a framework, a plugin or anyone's application code. Both allow unauthenticated remote code execution. Cloudflare says they affect every web server running PHP 5.4 or later. They are being called PHP2Shell.

The part worth slowing down for is where the bugs live. Both sit in what PHP does with a request before your code runs: parsing an upload, cleaning up after an error, setting up the next request on the same worker. A site with no upload form, no session handling and nothing but a static page rendered by PHP is still parsing those requests. That is why the fix has to come from PHP, and why no configuration setting fully replaces it.

[INFO]
Primary sources: PHP's two GitHub security advisories, GHSA-w8hw-w9fx-j79w (CVE-2026-109618) and GHSA-6wmf-4rv5-p3rp (CVE-2026-109619), both published 21 October 2026; CERT-EU Security Advisory 2026-018; Cloudflare's post on its WAF protections, 21 October. Exploitation timing from Cloudflare and Sansec. Where those sources disagree, the article says so.
[INFO]
Update, 29 October 2026. Exploitation is now confirmed. On 24 October a set of disposable honeypots run by Adel Karimi recorded 35 shells started by Apache on PHP 8.4.26 under mod_php, from two source addresses, in a chain consistent with CVE-2026-109618. CISA added both CVEs to its Known Exploited Vulnerabilities catalog on 26 October, with a 29 October deadline for US federal civilian agencies. Separately, on 23 October PHP disclosed a third, unpatched bug, CVE-2026-115560, which the 21 October releases do not fix; its interim mitigation is session.upload_progress.enabled=0. Details in the update section after the timeline. The demo now has a third card for it.
[INFO]
Update, 2 November 2026. The first documented real-world compromises are on firewalls, not web servers. Dream Research found PHP2Shell used against the management web server of Palo Alto Networks PAN-OS, which runs on PHP, chained with a Linux kernel privilege escalation (CVE-2026-46300, "Fragnesia") to get root. Dream counts 24 firewalls rooted and one internal management server reached through them, two of the firewalls and the server at a US government-affiliated organisation. Unit 42 independently verified the findings, and Palo Alto has released fixed PAN-OS builds. Details in the new section after the 29 October update.
◈ interactive artifact
Can You Configure Your Way Out?
Pick a PHP branch, how PHP runs, and the interim settings the advisories list. Each bug's status follows the advisories' own words. Try to reach fixed without installing the release.

//Two Bugs, One Shape

CVE-2026-109618, "RCE via OOM corruption". When a request runs out of memory, PHP abandons it with a longjmp straight out of whatever it was doing. In some places request memory is already reachable before it has been fully initialised. If an allocation fails at exactly that point, PHP does not account for the early exit, and request shutdown then works on memory in an invalid state. The advisory describes several conditions in multipart parsing - the format browsers use for file uploads - that can push a request to out-of-memory while staying inside the limits PHP appears to enforce.

CVE-2026-109619, "RCE via stale global state". State owned by one request - error, session, object or extension state - is not always reset before that request's memory is freed. A fatal error or an out-of-memory condition can leave it behind, as can a diagnostic emitted during shutdown. The next request on the same persistent worker can then act on that stale pointer during work that happens before normal initialisation, such as early INI handling or session upload-progress tracking. That is a use-after-free reachable by whoever sends the next request.

Both are rated 9.2 under CVSS v4.0 with the same vector: network, no privileges, no user interaction, high attack complexity with attack requirements present. Both carry the same weakness list, led by CWE-416 (use after free). They were reported by researchers credited as lcfr-hax, sagitzadik-wiz, tomash-areion and amyb-oai; Cloudflare names the organisations as Calif.io, Wiz, OpenAI and Quarkslab.

The fix for the first is structural. PHP no longer longjmps out on out-of-memory. A soft limit is now enforced at the next safe point in the VM, and a hard limit at a higher threshold ends the process outright. The fix for the second resets request state before the request heap is freed.

//Which Setups

From the two advisories:

Apache mod_php - affected and the most exposed. The confirmed code execution for CVE-2026-109619 was shown here, through PHP 8.5's fatal-error backtrace path; the upload-progress path was validated too.
PHP-FPM - susceptible to both. For CVE-2026-109618, full exploitability on FPM was not demonstrated. For CVE-2026-109619, the upload-progress path was validated on a normal dynamic pool.
LSAPI - considered susceptible; a conditional candidate for the second bug.
FrankenPHP - likely affected by the first. No early trigger for the second was found in its default configuration, which the advisory is careful to say does not make it immune.

Fixed releases: 8.5.12, 8.4.27, 8.3.36, 8.2.35. PHP 8.1 and older are end of life and get no release. The PHP security team published minimal source backports for 7.4, 8.0 and 8.1, and distribution vendors received patches in advance, so the answer for an old version is to ask the vendor, not to assume. CERT-EU notes that Remi's RPM repository did not have updates on release day, and points to the NCSC-NL list for products that embed PHP.

//The Timeline, Such As It Is

According to Sansec, Calif found the code-execution paths on 1 August. PHP gave advance notice of a security release on 20 October. Cloudflare says the details then leaked before the official release date. Cloudflare had WAF rules live at 03:02 UTC on 21 October, on every plan with its WAF deployed including Free, about nine hours ahead of the release. Sansec reports that Cloudflare saw early attacks at 07:43 UTC. PHP released at 13:30 UTC per CERT-EU; Sansec gives 14:00.

On exploitation, as of the original 22 October publication, be precise about what was established. Cloudflare says it observed attack traffic against its customers, including attackers modifying payloads to get past the new rules, and gives no counts. CERT-EU does not confirm active exploitation; it says proofs of concept have started circulating, which raises the likelihood that attackers are already using them. No source reviewed here reports a confirmed compromise. Attempts are documented; outcomes are not. That changed two days later; see below.

//Update, 29 October: From Attempts to Shells

Earlier than the release. Amazon Threat Intelligence says attackers were targeting the flaws from 17 October, four days before the patches, as reported by BleepingComputer and The Register. Cloudflare, Hadrian, watchTowr, Previdian and Patchstack all saw attempts around disclosure and, per BleepingComputer, tagged every one as unsuccessful. The PHP security team said none of the proofs of concept that leaked before the release were functional.

The first well-evidenced compromise. Adel Karimi, detection and response lead at Perplexity, ran three disposable honeypots presenting ordinary PHP pages on PHP 8.4.26 - one release behind the fix - under Apache mod_php with a single worker and a 128 MiB memory limit. On 24 October, between 13:47 and 18:57 UTC, the sensors recorded 35 shells started by Apache (/bin/sh as uid 33), each preceded by a complete exploit request: 3 from one source address on one honeypot, 32 from a second address across all three. The chain was a multi-stage multipart sequence with a memory-disclosure step, consistent with CVE-2026-109618; the records do not show CVE-2026-109619 being used. The shells then tried to reach an outside host with the PHP command line, curl and wget. None succeeded in downloading anything - on these minimal sensors wget was missing, the web root was read-only and curl never completed a connection. The report does not attribute the activity, and says two addresses with related tooling are not evidence of two actors, or of one.

Karimi's own caveat is the one to carry forward: "The evidence demonstrates this chain on the intentionally favorable single-worker mod_php profile; it is not a measurement of exploit reliability on other worker counts, PHP builds, or applications." Expel's Marcus Hutchins called it "by far the highest quality confirmation of in-the-wild php2shell exploitation I've seen so far". What it proves is that a working exploit is in use against mod_php, the configuration PHP's advisory already rated most exposed. It does not prove the same chain is reliable against a multi-worker FPM pool.

Scale. TU Delft's Threat Intelligence Lab, as reported by The Register, tracked more than 50,000 PHP2Shell exploitation requests from over 600 IP addresses in 70 countries; 171 of those addresses went beyond probing and sent exploit code or malware droppers. That counts requests, not compromises.

CISA. On 26 October CISA added CVE-2026-109618 ("PHP Memory Corruption Vulnerability") and CVE-2026-109619 ("PHP Stale Internal Request-State Vulnerability") to the KEV catalog. The Register gives a 29 October deadline for federal civilian agencies, three days rather than the usual two weeks. The deadline binds only those agencies, but a KEV listing is the clearest public signal that exploitation is no longer theoretical.

A third bug the release does not fix. On 23 October PHP published an informational advisory for CVE-2026-115560, a code-execution path through session upload progress. In PHP's words, it "can only occur under an unusual combination of configuration and application code": the application must set session.serialize_handler to php_binary or php_serialize in its configuration, switch it to php at runtime with ini_set() before calling session_start(), and leave upload progress enabled. PHP is fixing it in the next regular bugfix release, not an emergency one, and will publish the full advisory then. Until then it suggests session.upload_progress.enabled=0 "to fully protect from an unlikely RCE vector" - the same setting already listed for CVE-2026-109619. If you set it on 21 October, keep it. No exploitation of CVE-2026-115560 has been reported.

An unrelated fix in the same week. On 26 October PHP rebuilt its Windows packages (8.5.12-1, 8.4.27-1, 8.3.36-1, 8.2.35-1) to ship Brotli 1.2.1, fixing CVE-2026-111497 in the bundled decoder. The PHP runtime versions are unchanged; the -1 marks a Windows rebuild. It is not part of PHP2Shell, but anyone running PHP on Windows needs the rebuilt package too.

//Update, 2 November: PHP Inside a Firewall

Every setup this article discusses assumes you know where your PHP is. The first confirmed compromises outside honeypots were in a place most people would not list: the management web server of Palo Alto Networks firewalls. Palo Alto's advisory for CVE-2026-109618 lists PAN-OS on PA-Series and VM-Series firewalls and on Panorama as affected, scoped to the management web interface - the HTTPS web UI and XML API - and to any data-plane interface with a management profile attached. The GlobalProtect portal and gateway are not affected. Dream Research reports that PAN-OS 12.1 and 12.2 ship PHP 8.0.30, a branch with no official PHP fix, which is why the fix had to come from Palo Alto rather than php.net.

What Dream found. In its post, updated on 29 October, Dream describes an attacker who used FOFA to find about 19,000 internet-facing PAN-OS management interfaces, fingerprinted about 5,000, and filtered to 240 in the United States, Japan, Taiwan and South Korea running 12.1 or 12.2. A custom, non-public PHP2Shell exploit gave code execution as the web process; the attacker then used CVE-2026-46300, a Linux kernel privilege escalation in the XFRM ESP-in-TCP code that Dream calls Fragnesia, to replace /etc/pam.d/su and become root. Dream counts 24 firewalls rooted, most on 23 and 24 October. On 22 of them the attacker only planted a web shell, per The Record. Two belonged to a US government-affiliated organisation; one of those crashed and did not come back, and from the other the attacker opened a reverse SSH tunnel and compromised the internal server that manages the organisation's firewalls - 25 systems in all.

From that management server Dream saw the attacker use its LDAP connection to enumerate Active Directory, attempt password spraying and backdoor accounts, and go after SAML and Keycloak configuration. Dream could not confirm whether those succeeded, and says to treat the identity infrastructure as compromised until ruled out. Private keys on the firewalls - HA replication, TLS and device authentication - should be assumed exposed. Dream cites Chinese-language tooling and Chinese AI services in the attacker's infrastructure, and Claude Code installed on it; it does not name an actor. Unit 42 tracks the activity as CL-UNK-1280 and says it independently verified the tooling and results.

Scale. Unit 42 says about 0.02% of Palo Alto's installed base had internet-facing management interfaces and was impacted, and those customers have been contacted. Management interfaces are not exposed by default. Palo Alto raised the advisory to Critical with the highest urgency on 27 October; restricting management access to a jump box drops its score from 9.2 to 5.2. Separately, The Record reports GreyNoise saw at least six successful exploitations elsewhere, and CISA added CVE-2026-46300 to the KEV catalog on 28 October.

What to do on PAN-OS. Take the management interface off the internet and limit it to trusted internal addresses, install the fixed build for your branch from the advisory (for example 12.2.4-h1, 12.1.10-h3, 11.2.16-h1, 11.1.16-h4, 10.2.18-h13), and patch the kernel issue. Then hunt: Palo Alto's fix closes the door but does not remove a web shell already planted on 23 or 24 October. If the interface was exposed, rotate the keys and credentials stored on the device, including the LDAP service account.

The broader lesson is for inventory. A scan for PHP versions finds web servers. It does not find the PHP inside a firewall, a NAS, a router admin page or any appliance whose vendor bundled an old branch and has to ship its own fix. Those products are fixed when their vendor says so, not when php.net does.

//The Popular Workaround Is Not Enough

The workaround repeated most often is to turn off session upload progress. It addresses one path in one of the two bugs, and PHP core developer Gina Peter Banyard warned, as quoted by Sansec, that disabling it "alone is not enough". PHP's own advisory for CVE-2026-109619 says plainly that there is "no complete generic configuration mitigation", and the advisory for CVE-2026-109618 says updating is "the only complete mitigation". The interim settings, and what each actually buys:

memory_limit=-1, set so applications cannot override it (for example php_admin_value in the FPM pool) - the main configuration mitigation for the first bug, and not complete: if an underlying allocation such as mmap() fails, the vulnerable path is still reachable. It also lets one request use all of the server's memory.
session.upload_progress.enabled=0 - closes the upload-progress path of the second bug and nothing else. It has to be set in php.ini, the pool or the server config; ini_set() and FPM .user.ini apply too late. The advisory suggests leaving it off after patching if the feature is unused, and since 23 October it is also PHP's interim mitigation for the unpatched CVE-2026-115560.
fatal_error_backtraces=0 - PHP 8.5 only; removes the confirmed code-execution producer for the second bug, not the other stale state.
Blocking multipart/form-data at the frontend - recommended by the advisory if the application does not use it. It breaks every upload form if it does.
Low post_max_size and frontend limits on request size, field count, part count, headers and nesting - reduce out-of-memory risk; do not replace the update.
Container or cgroup memory limits - an alternative with limitations. RLIMIT_AS and RLIMIT_DATA - do not use; the advisory says they can trigger the vulnerable path.

Every one of those settings needs every worker restarted before it does anything, and the same is true of the fix itself. A running PHP-FPM pool or Apache process keeps the code and settings it started with. Check the version in a page served over HTTP, not with php -v, which reports the command-line build and can be a different binary. Sansec makes the same point about confirming settings in a request served by FPM rather than on the command line.

//What This Means in Practice

Most PHP runs inside something else: a shared host, a control panel, a container image, a product appliance. Cloudflare's advice to hosting customers is to ask the provider, because updating your own code or plugins does nothing for a bug in the runtime. For containers, the base image has to be rebuilt on a fixed release; a running container keeps the old one.

If you cannot update today, CERT-EU's fallback is the honest one: take internet-facing PHP off the public network until the fix is applied and verified, and treat the interim settings as reducing risk rather than removing it.

[IOC]
CVEs: CVE-2026-109618 (GHSA-w8hw-w9fx-j79w, OOM corruption), CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp, stale global state) - CVSS v4.0 9.2 each
Affected: every PHP below 8.2.35, 8.3.36, 8.4.27, 8.5.12; 8.1 and older have no official release
Fixed: 8.5.12, 8.4.27, 8.3.36, 8.2.35 (21 October 2026)
Trigger surface: request parsing before application code, including multipart bodies
Most exposed: Apache mod_php
After updating: restart every PHP-FPM pool and Apache worker; verify the version over HTTP
Exploited: yes - CISA KEV 26 October 2026; confirmed shells on mod_php honeypots 24 October
Also set: session.upload_progress.enabled=0 for CVE-2026-115560 (unpatched, informational advisory 23 October)
[IOC]
Detection signals from Karimi's 24 October report (none proves code execution alone; the strongest is an unexpected shell under the web server):
Error log: Allowed memory size of 134217728 bytes exhausted ... in Unknown on line 0 (out-of-memory before application code runs)
Error log: PHP Request Startup: Session ID is too long or contains illegal characters
Error log: child pid ... exited on signal 11 shortly after a multipart POST
Process: apache2 (uid 33) spawning /bin/sh, then curl, wget or php, followed by outbound connections
HTTP: bursts of large multipart/form-data POSTs to / or /index.php with no User-Agent and very large PHPSESSID cookies, from one source within minutes
Execution sources (24 Oct): 15.204.59.70, 162.35.99.94; attempt-only: 104.28.208.84, 144.48.4.242
[IOC]
PAN-OS campaign (Dream Research, verify against Unit 42's IOC list): web shell /unauth/php/change_password.php (about 103 bytes); persistence under /usr/local/lib/.panops/ with a systemd service and an rc.local hook; /etc/pam.d/su replaced with pam_permit.so; reverse SSH tunnel with a SOCKS5 proxy (iox); large repeated multipart POSTs to the management interface; LDAP queries from the firewall management server
Chained CVE: CVE-2026-46300 (Linux kernel, "Fragnesia"), KEV 28 October 2026
Unit 42 cluster: CL-UNK-1280

//Sourcing and Uncertainty

The bug descriptions, CVSS vectors, affected and fixed versions, per-SAPI exposure, patch design and the completeness of each workaround come from PHP's two GitHub advisories. The release time, backports, Remi note, NCSC-NL pointer and exploitation status come from CERT-EU 2026-018. The WAF timing, the disclosing organisations, the PHP 5.4 floor and the observed attack traffic come from Cloudflare.

Where sources disagree. Sansec's write-up attaches the upload-progress use-after-free to CVE-2026-109618 and the fatal-error backtrace path to CVE-2026-109619. PHP's advisories put both of those under CVE-2026-109619 and describe CVE-2026-109618 as the out-of-memory corruption. This article follows PHP's advisories. The release time is 13:30 UTC in CERT-EU and 14:00 UTC in Sansec. Sansec is the only source here for the 1 August discovery date and the 07:43 UTC attack time.

Update sources (29 October). The honeypot shells, timings, configuration, post-exploitation attempts, caveat and detection signals are from Karimi's confirmed-RCE report in his public honeypot-data repository. The CISA listing and vulnerability names are from CISA's 26 October alert; the 29 October deadline is from The Register (the alert itself gives no date). Amazon's 17 October first sighting, the TU Delft counts and Hutchins' quote come through BleepingComputer and The Register, not from Amazon, TU Delft or Expel directly. The PHP team's statement that the leaked proofs of concept were not functional is reported by BleepingComputer, which does not quote it. CVE-2026-115560 and the Windows Brotli rebuild are from PHP's own news archive.

Update sources (2 November). The PAN-OS campaign - scanning counts, targeting, the Fragnesia chain, the 25 systems, the government-affiliated victim, post-exploitation and indicators - is from Dream Research's post as updated on 29 October. Affected products, the management-interface scope, fixed builds, severity changes and the jump-box score are from Palo Alto's advisory (updated 29 October). The 0.02% figure, CL-UNK-1280 and independent verification are from Unit 42's threat brief. The 22-of-24 web-shell-only count, the GreyNoise figure and the 28 October KEV date for CVE-2026-46300 are from The Record. Dream's country attribution rests on language, tooling and AI-service use, which is not proof of who is behind it; this article does not go further.

What is unknown. Who is exploiting it in general, and how many real servers - as opposed to deliberately favourable honeypots - have been compromised. No source reviewed here counts compromises. The details of the leak - what leaked, where and when - are not public beyond Cloudflare saying it happened. The guidance to restart workers after updating, and to verify over HTTP rather than the command line, is my framing of a general property of long-running processes, consistent with Sansec's advice on settings; the advisories state the restart requirement for the configuration mitigations.