Cloudflare expands WAF protection for phpAfterShell
Published:
Cloudflare has expanded its WAF rules for known attack patterns targeting the phpAfterShell PHP vulnerability. The firewall is not a substitute for applying PHP updates.
Cloudflare has described updated protection for phpAfterShell (CVE-2026-126714), a flaw in PHP's default file-based session handler that can lead to remote code execution. On November 19 the company extended an existing PHP remote-code-execution rule to detect known attack patterns. Cloudflare says the rule is included in both its free and paid managed rulesets and defaults to blocking. Three additional rules for PHP-FPM and the SOAP extension are available on paid plans and initially log matches to avoid prematurely blocking legitimate traffic. Security teams can review those matches and change the action. Cloudflare explicitly cautions that the WAF cannot see every route to the vulnerabilities. It therefore recommends upgrading PHP to a fixed version and restarting all affected workers.
Why it matters
Security teams need to review the additional rules that default to logging and still update PHP because the WAF does not cover every attack path.
Source retrieved: 2026-12-03