Technology1 min read

How Cloudflare WAF helps protect against phpAfterShell and other critical PHP flaws

By · Published by Everything Blog

In short

The phpAfterShell vulnerability, tracked as CVE-2026-126714, was resolved by the PHP project alongside six other critical flaws on November 19, 2026. While Cloudflare deployed protective firewall rules across both free and paid service tiers, administrators are advised that completely mitigating the threat requires updating the core installation. Researchers who uncovered the vulnerability successfully demonstrated remote code execution by pairing it with an undisclosed memory corruption issue. No active in-the-wild exploitation had been observed or cataloged by CISA at the time of disclosure.

Key points

  • Web application firewalls only offer temporary mitigation because complete remediation re…: Web application firewalls only offer temporary mitigation because complete remediation requires updating PHP packages and restarting workers.
  • The vulnerability achieves remote code execution when an interrupted write operation trig…: The vulnerability achieves remote code execution when an interrupted write operation triggers the deserialization of attacker-controlled session data.
  • Organizations should prioritize patching immediately even though no active exploitation w…: Organizations should prioritize patching immediately even though no active exploitation was recorded in CISA's catalog upon disclosure.

Sources checked by our analysis pipeline: 1

On November 19, 2026, the security research company depthfirst disclosed phpAfterShell (CVE-2026-126714), a vulnerability in PHP's default file-based session handler that can lead to remote code execution. Under the Common Vulnerability Scoring System (CVSS) 4.0, it scores 9.2 out of 10 (Critical). The PHP project fixed it the same day in versions 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0. These releases fix 16 other security vulnerabilities, six of them also rated critical.

Cloudflare’s web application firewall (WAF) blocks known phpAfterShell attack patterns, including for customers on the Free plan. The protection comes from a PHP remote code execution rule we first deployed in October 2026 for the php2shell vulnerabilities. That rule already detected part of the phpAfterShell attack pattern before the vulnerability was disclosed, and on November 19 we updated its detection logic to cover phpAfterShell. The rule is part of both the Cloudflare Free Managed Ruleset and the Cloudflare Managed Ruleset, is enabled by default, and its default action is Block.

In the same WAF release, we added three new rules to the Cloudflare Managed Ruleset for paid plans: one…

Technology