Cloudflare WAF Adds Protection for phpAfterShell and Other PHP Flaws

Summary
PHP fixed phpAfterShell (CVE-2026-126714) and 16 other flaws; Cloudflare updated WAF coverage and added paid-plan rules for PHP-FPM and SOAP issues. Cloudflare says the WAF is not a patch: upgrade PHP and restart workers.
Key points
- phpAfterShell can enable remote code execution when an interrupted write leaves mixed session data that PHP later deserializes; exploitation also requires suitable conditions, including controlled session data.
- PHP released fixes on November 19, 2026, in versions 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0; vulnerable-version exposure depends on each flaw’s conditions.
- Cloudflare updated its PHP remote code execution WAF rule to cover phpAfterShell; the rule is enabled by default and blocks matching requests on Free and paid plans.
- Cloudflare added paid-plan rules for a PHP-FPM request-smuggling flaw and two PHP SOAP flaws. They default to Log because matching requests may also be legitimate.
- Cloudflare says a WAF cannot block every exploitation path, including session data that does not pass through it and flaws dependent on server state; upgrading PHP and restarting workers is the complete fix.
- As of November 19, Cloudflare said it had found no reports of in-the-wild exploitation and none of the 17 vulnerabilities was listed in CISA’s Known Exploited Vulnerabilities catalog.
Article Details
- Vulnerability Types
- Session-file deserialization leading to remote code execution
- FastCGI request smuggling
- Object injection caused by a session-serializer mismatch
- Use-after-free vulnerabilities
- Severity
- Critical; phpAfterShell is rated CVSS 4.0 9.2/10.
- Affected Versions
- PHP 8.2 before 8.2.36
- PHP 8.3 before 8.3.37
- PHP 8.4 before 8.4.28
- PHP 8.5 before 8.5.13
- PHP 8.6.0 release candidates
- Exploitation Status
- not_reported
- Exploit Availability
- unknown
- Patch Status
- available
- Workarounds
- Disable session.upload_progress.enabled and limit untrusted data stored in sessions.
- Turn off FastCGI connection reuse.
- On PHP 8.5, set fatal_error_backtraces=0.
- Fix configuration errors that produce PHP startup warnings, or send PHP errors to syslog instead of a file.
- Keep PHP-FPM listeners off untrusted networks.
- Use the applicable Cloudflare WAF rules to block requests matching the known attack patterns.
MITRE ATT&CK
T1059.004 · Unix ShellThe article describes shell-command execution after compromise, including /bin/sh -c, system(), and passthru().T1059.006 · PythonThe article describes PHP code evaluation through eval() and assert() as possible post-compromise command execution.T1190 · Exploit Public-Facing ApplicationThe article describes remote attacks exploiting vulnerable PHP applications, including phpAfterShell and a PHP-FPM FastCGI request-smuggling flaw.T1505.003 · Web ShellThe article says attackers often drop a small PHP webshell after initial compromise.
CVE
CVE-2026-109618PHP Group · PHP; Siemens · AMIS TS; +105 moreexecution rules in an emergency release on October 21, 2026, after the php2shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619) were disclosed. We extended them to CVE-2026-115560 on October 23 and refinedCVE-2026-109619PHP Group · PHP; Siemens · AMIS TS; +106 moreUse-after-free, described by PHP as an incomplete fix for CVE-2026-109619. No code execution demonstrated.CVE-2026-115560Vendor / Product unavailableCVE-2026-129289 was introduced in PHP 5.6.0 and that releases older than 8.2 may also be affected by CVE-2026-115560.CVE-2026-126714PHP Group · PHPOn 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 theCVE-2026-129182PHP Group · PHPFlaws triggered by server state. CVE-2026-129496, CVE-2026-129481, CVE-2026-129474 and CVE-2026-129182 depend on error logs, diagnostics and worker lifecycle. They do not have dedicated WAF rules, and the patch and theCVE-2026-129289PHP Group · PHPrules to the Cloudflare Managed Ruleset for paid plans: one for a request smuggling flaw in PHP-FPM (CVE-2026-129289), and two for flaws in PHP's SOAP extension (CVE-2026-15353 and CVE-2026-129506) that PHP fixed inCVE-2026-129474PHP Group · PHPFlaws triggered by server state. CVE-2026-129496, CVE-2026-129481, CVE-2026-129474 and CVE-2026-129182 depend on error logs, diagnostics and worker lifecycle. They do not have dedicated WAF rules, and the patch and theCVE-2026-129481PHP Group · PHPFlaws triggered by server state. CVE-2026-129496, CVE-2026-129481, CVE-2026-129474 and CVE-2026-129182 depend on error logs, diagnostics and worker lifecycle. They do not have dedicated WAF rules, and the patch and theCVE-2026-129496PHP Group · PHPFlaws triggered by server state. CVE-2026-129496, CVE-2026-129481, CVE-2026-129474 and CVE-2026-129182 depend on error logs, diagnostics and worker lifecycle. They do not have dedicated WAF rules, and the patch and theCVE-2026-129506Vendor / Product unavailableflaw in PHP-FPM (CVE-2026-129289), and two for flaws in PHP's SOAP extension (CVE-2026-15353 and CVE-2026-129506) that PHP fixed in the same releases. These rules are enabled by default with the Log action, becauseCVE-2026-15353Vendor / Product unavailablefor a request smuggling flaw in PHP-FPM (CVE-2026-129289), and two for flaws in PHP's SOAP extension (CVE-2026-15353 and CVE-2026-129506) that PHP fixed in the same releases. These rules are enabled by default with the
