Summary: On November 19, 2026, Cloudflare updated its PHP remote code execution WAF rule to cover phpAfterShell (CVE-2026-126714), a Critical-rated (9.2/10 CVSS) flaw in PHP’s default session handler, and added three Log-mode rules for PHP-FPM and SOAP flaws. The phpAfterShell rule is active on every plan, including Free. The catch: a WAF cannot see the final step of this attack, so the PHP upgrade — released the same day — is still the fix that matters.
How a broken session write becomes code execution
PHP stores session data in files by default. When a request ends, PHP writes the updated session back to the file; on the next session_start(), it deserializes that content back into $_SESSION. phpAfterShell is triggered when that write gets interrupted: the file can end up holding the start of new session data followed by the tail of old data. If an attacker controlled that old data, the next session read can deserialize objects of the attacker’s choosing.
Getting there takes setup. An attacker first needs to plant controlled data in the session — PHP’s advisory points to session upload progress, a feature that writes file-upload state into the session, and to applications that store large user-controlled strings there. Per PHP, code execution then requires an interruption at a useful moment plus a suitable deserialization gadget chain in the application. The research company depthfirst, which disclosed the flaw, reports it reached code execution without an application gadget by chaining a second, undisclosed memory-corruption bug in a PHP-native class. Cloudflare notes the sources it reviewed do not establish whether that second bug is fixed in the November 19 releases.
What Cloudflare shipped on November 19
The coverage is not brand new. Cloudflare released PHP RCE rules in an emergency drop on October 21, 2026 for the php2shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619), extended them to CVE-2026-115560 on October 23, and refined them in the following weeks partly with help from researchers in Cloudflare’s PHP CTF challenge. Because phpAfterShell shares php2shell’s core technique — planting serialized data in session storage and waiting for PHP to deserialize it — the existing rule already matched part of the new attack pattern before disclosure. The November 19 update extends its detection logic and its CVE list.
Concretely:
- Every plan. The PHP Remote Code Execution Attack rule (now listing CVE-2026-126714 alongside the php2shell CVEs) ships in both the Cloudflare Free Managed Ruleset and the paid Cloudflare Managed Ruleset, enabled by default with Block. Free-plan customers do nothing; paid plans should confirm the ruleset is deployed.
- Paid plans (Pro, Business, Enterprise). Three new rules in Log mode: PHP-FPM request smuggling (CVE-2026-129289) and two SOAP extension flaws (CVE-2026-15353, CVE-2026-129506). Log is deliberate — the patterns they match can also appear in legitimate traffic, so Cloudflare asks customers to review matches in Security Events and switch to Block themselves.
For context on scope: the same PHP releases fix 17 vulnerabilities in total, six of them critical, including the FPM smuggling bug — which needs a FastCGI connection-reusing front end (nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, or HAProxy), an application path that opens php://input without reading it to the end, and the path of an existing script. Four of the other critical flaws are use-after-frees that depend on error logs, diagnostics and worker lifecycle, not on request patterns.
Where the WAF stops
Cloudflare is upfront that this is an additional layer, not the fix, and the gaps are structural:
- The deserialization step. The final exploit happens inside PHP when it reads a corrupted session file. The WAF can block the requests that plant the payload, not the read.
- Session data from elsewhere. If your app copies user-controlled data into the session from a database, queue or upstream API, it may never cross the WAF in a recognizable form.
- Server-state flaws. CVE-2026-129496, 129481, 129474 and 129182 have no dedicated rules; patching and configuration (for example,
zend.exception_ignore_args=1, the php.ini-production default, blocks the demonstrated attack for CVE-2026-129474) are the only answer. - Traffic that bypasses Cloudflare, including internal service traffic and PHP-FPM listeners exposed directly to a network.
Who is exposed: PHP 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28, 8.5 before 8.5.13, and the 8.6.0 release candidates. End-of-life 7.4, 8.0 and 8.1 mitigation branches are not affected by phpAfterShell per depthfirst, but PHP says CVE-2026-129289 was introduced in 5.6.0 and releases older than 8.2 may be affected by CVE-2026-115560. Distributions often backport fixes without changing the version number, so check the full package version against your distro’s advisory. Cloudflare’s post continues with deployment details beyond what this summary covers.
One reassuring fact: as of November 19, 2026, none of the 17 vulnerabilities was in CISA’s Known Exploited Vulnerabilities catalog, and Cloudflare reports no indication of exploitation in the wild.
Our take: Act now, but on the upgrade, not the firewall. If you ship PHP, the patch plus a restart of every worker is the only complete fix — and because the one demonstrated exploit chain rides on a second bug whose fix status is unknown, waiting a normal patch cycle is a bet we would not take on an internet-facing app. The Free-plan Block rule makes this cheap to layer on the same afternoon; treat the paid Log-mode rules as free telemetry and flip them to Block only after checking Security Events. The assumption behind all of this is that your traffic actually passes through Cloudflare — an FPM listener reachable on the internal network is not covered. Teams with no PHP in production can ignore this entirely. What would change our position: a KEV listing or published exploitation would move the Log-to-Block switch from “after review” to “today” — and if exploitation stays quiet while you patch on schedule, the WAF layer can simply stay as it is.
