we_are_coded.by CODE · The world, decoded
БГ

Cloudflare · Security

Cloudflare WAF blocks phpAfterShell on every plan, including Free, and PHP fixed CVE-2026-126714 in five versions

depthfirst disclosed phpAfterShell (CVE-2026-126714) on 19 November: an interrupted session write mixes old and new content, and PHP deserializes the mix. It scores 9.2 under CVSS 4.0, and the fixes landed the same day in versions 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0. According to Cloudflare, its WAF blocks known phpAfterShell attack patterns, including on the Free plan. As of 19 November, none of the 17 flaws is in CISA's Known Exploited Vulnerabilities catalog and there is no sign of exploitation.

Source
Cloudflare
Published
The event
Checked on
Responsible editor
Cvetelin Ivanov
How we work
MethodCorrections

Interrupt a session write halfway and PHP can read the old data as new. That is phpAfterShell, CVE-2026-126714, and it does not ask for a password. It asks for an interrupted write and an application that keeps attacker-chosen data in the session.

Fact

The facts: on 19 November 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 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. According to Cloudflare, its WAF blocks known phpAfterShell attack patterns, including for customers on the Free plan. As of 19 November 2026, none of the 17 vulnerabilities was listed in CISA's Known Exploited Vulnerabilities catalog, and no source Cloudflare reviewed reports exploitation in the wild. The vulnerable versions are 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.

How it works. PHP stores session data in files by default. When the write is interrupted, the file can hold the beginning of the new session data followed by the end of the old one. On the next request, session_start() deserializes that mix. If the old data was under an attacker's control, PHP can end up deserializing objects of the attacker's choice.

PHP names two ways to place controlled data in the session: session upload progress, and applications that store large user-controlled strings in the session. According to PHP, code execution also requires an interruption at a useful point in the write and a suitable deserialization gadget chain in the application. depthfirst reports that it reached code execution without such a chain, by chaining a second, undisclosed memory-corruption bug in a PHP-native class. The sources Cloudflare reviewed do not establish whether that second bug is fixed in the 19 November releases.

The PHP remote code execution rule already matched part of the phpAfterShell pattern before the disclosure.

According to Cloudflare, the PHP remote code execution rule was first deployed on 21 October 2026 after php2shell (CVE-2026-109618 and CVE-2026-109619) and was updated on 19 November to cover phpAfterShell. It 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 release Cloudflare added three new rules 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). They are enabled by default with the Log action, because the patterns they look for can also appear in legitimate traffic.

Cloudflare says it plainly: the WAF is an additional layer of defense, not a replacement for the patch. Several of the critical flaws depend on server configuration or can be reached through paths a WAF does not see. The only complete fix is one: upgrade PHP and restart every worker.

The other six critical flaws each need a specific configuration. CVE-2026-129289 is in PHP-FPM: an unauthenticated attacker can smuggle a second FastCGI request and run PHP code as the worker. CVE-2026-115560 is object injection through a mismatch between session serializers. CVE-2026-129496 is a use-after-free in the timezone cache, CVE-2026-129481 is a use-after-free in session shutdown, and CVE-2026-129474 and CVE-2026-129182 are use-after-free in fatal error backtraces.

The check is the PHP version. The number of blocked requests does not tell you whether you are exposed. The WAF buys time; the patch closes. Upgrade and restart your workers.

The visual is generated code-art, no third-party images.