Suspected Vietnam-Linked Hackers Target Southeast Asia in South China Sea Espionage Campaign · 12h Vulnerability in GNU m4 software · 16h Vulnerability in SMSEagle RCDevs OpenOTP SMS integration connector software · 17h Fragnesia: When a Firewall Becomes the Target · 1d Vulnerability in Chainlit software · 1d Vulnerabilities in GNU Screen software · 1d Drupal Warns of New Highly Critical Site Takeover Vulnerability Under Active Exploitation · 1d Hackers Exploit 10 Vulnerabilities Across Mitel, Juniper, Vates, and Danfoss Products · 1d VMware VMSA-0011: When the Hypervisor Becomes the Attack Surface · 2d Vulnerabilities in PrestaHelp phsuperpack module for PrestaShop · 2d Suspected Vietnam-Linked Hackers Target Southeast Asia in South China Sea Espionage Campaign · 12h Vulnerability in GNU m4 software · 16h Vulnerability in SMSEagle RCDevs OpenOTP SMS integration connector software · 17h Fragnesia: When a Firewall Becomes the Target · 1d Vulnerability in Chainlit software · 1d Vulnerabilities in GNU Screen software · 1d Drupal Warns of New Highly Critical Site Takeover Vulnerability Under Active Exploitation · 1d Hackers Exploit 10 Vulnerabilities Across Mitel, Juniper, Vates, and Danfoss Products · 1d VMware VMSA-0011: When the Hypervisor Becomes the Attack Surface · 2d Vulnerabilities in PrestaHelp phsuperpack module for PrestaShop · 2d
🛡️
ACyber Sentinel Security Assessment Team
← Back to feed
⚡ Intelligence Report

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

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

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 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 in the same releases. These rules are enabled by default with the Log action, because the request patterns they look for can also appear in legitimate traffic, and blocking by default could disrupt it. Customers can review matching requests in Security Events now and change the action to Block once they confirm the rules do not affect legitimate traffic.

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, and the only complete fix is to upgrade PHP and restart every worker. Our analysts continue to monitor attack activity and will update the rules as new techniques and variations appear. You can track rule changes in the WAF changelog and follow how the vulnerabilities develop in the dedicated Cloudflare Zero Wire briefing.

There appears to be no indication so far that these vulnerabilities have been exploited. As of November 19, 2026, none of the 17 vulnerabilities was listed in CISA's Known Exploited Vulnerabilities catalog, and no source we reviewed reports exploitation in the wild.

What we know about phpAfterShell

PHP stores session data in files by default. When an application calls session_start(), PHP reads the session file and deserializes its content into the $_SESSION array. When the request ends, PHP writes the updated session back to the same file.

phpAfterShell is triggered when that write is interrupted. The session file can then hold the beginning of the new session data followed by the end of the old one. On the next request, session_start() deserializes this mixed content. If an attacker controlled the old data, PHP can end up deserializing objects of the attacker's choice.

An attacker trying to exploit the flaw is likely to first search for a way to place controlled data in the session. PHP's advisory names two:

  • Session upload progress, a PHP feature that writes information about a running file upload into the session. A remote client can use it to shape the stored data.
  • 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 an application gadget by chaining a second, undisclosed memory-corruption bug in a PHP-native class. The sources we reviewed do not establish whether that second bug is fixed in the November 19 releases.

depthfirst says it discovered and reported phpAfterShell. The CVE record credits Leo Lin and Asahi as reporters.

The other critical flaws

The same releases fix six more critical vulnerabilities. Each one needs a specific configuration to be exploitable:

An unauthenticated attacker can smuggle a second FastCGI request into PHP-FPM and run PHP code as the worker.

A front end that reuses backend FastCGI connections (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 PHP script.

Session serializer

Object injection through a mismatch between session serializers. First covered in our php2shell briefing, now fixed.

Session upload progress enabled. PHP widened the scope: applications, pools or command-line jobs that use different serializers and share a session store are affected.

Timezone cache

Use-after-free that can crash a fresh worker and possibly run code. PHP demonstrated code execution locally with known memory addresses.

Non-thread-safe builds where a startup diagnostic has been written to a PHP error log file.

Session shutdown

Use-after-free, described by PHP as an incomplete fix for CVE-2026-109619. No code execution demonstrated.

PHP 8.3 and later.

Fatal error backtraces

Use-after-free in magic method backtraces.

PHP 8.5 and later, where fatal error backtraces are enabled by default. Setting zend.exception_ignore_args=1, the php.ini-production default, blocks the demonstrated attack.

Fatal error backtraces

Use-after-free. No code execution demonstrated.

PHP 8.5, specific path-level settings, and an Apache per-directory configuration or front end that produces an early diagnostic.

Who is affected

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. Whether a deployment is exposed depends on the conditions of each flaw.

PHP 8.1 and earlier are end-of-life. depthfirst says the official 7.4, 8.0 and 8.1 end-of-life mitigation branches are not affected by phpAfterShell, but PHP says CVE-2026-129289 was introduced in PHP 5.6.0 and that releases older than 8.2 may also be affected by CVE-2026-115560.

Linux distributions often backport fixes without changing the PHP version number. Check the full package version against your distribution's advisory.

How Cloudflare WAF protects you

PHP runs a large share of the web, often inside content management systems, plugins, and container images that teams do not update directly. Patching every PHP runtime takes time. Cloudflare WAF reduces your exposure while you patch.

phpAfterShell: protection on every plan

We released the original PHP remote code execution 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 refined them several times in the following weeks, based in part on reports from security researchers who took part in a PHP Capture the Flag (CTF) challenge.

phpAfterShell shares an attack technique with php2shell: an attacker plants serialized PHP data in session storage and waits for PHP to deserialize it. Because of that overlap, the existing rule already matched part of the phpAfterShell attack pattern before disclosure. On November 19, we updated the rule's detection logic to cover phpAfterShell and added CVE-2026-126714 to its description.

Rule description

Rule ID

Default action

PHP Remote Code Execution Attack (CVE-2026-109618, CVE-2026-109619, CVE-2026-115560, CVE-2026-126714) #6

Cloudflare Free Managed Ruleset (Free plan)

PHP Remote Code Execution Attack (CVE-2026-109618, CVE-2026-109619, CVE-2026-115560, CVE-2026-126714) #6

Cloudflare Managed Ruleset (Pro, Business and Enterprise plans)

Free plan customers do not need to take any action. On paid plans, the rule is active wherever the Cloudflare Managed Ruleset is deployed. You can use the links in the Zero Wire briefing to go straight to the rules in your dashboard.

New rules for PHP-FPM and SOAP flaws

The three new rules are part of the Cloudflare Managed Ruleset (Ruleset ID efb7b8c949ac4650a09736fc376e9aee) and are available on Pro, Business and Enterprise plans.

Rule description

Rule ID

Default action

PHP-FPM - CVE:CVE-2026-129289

PHP SOAP - CVE:CVE-2026-15353

PHP SOAP - CVE:CVE-2026-129506

To review their matches, go to Security > Analytics > Events and filter by rule ID. If the matches are not legitimate traffic, change the rule action to Block: go to Security > Settings, edit the Cloudflare Managed Ruleset, search for the CVE identifier and set the rule action to Block, or you can refer to the links in the Zero Wire briefing to go straight to the rules configuration.

What the WAF cannot see

A WAF can block an exploit when the malicious data arrives in an HTTP request that passes through Cloudflare. It cannot block every path to these vulnerabilities, including:

  • The deserialization step. phpAfterShell's final step happens inside PHP, when it reads a corrupted session file. The WAF can block the requests that plant the payload, not the read itself.
  • Session data from other sources. If an application copies user-controlled data into the session from a database, a queue or an upstream API, that data may never cross the WAF in a recognizable form.
  • Flaws 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 the configuration changes below are the way to address them.
  • Traffic that bypasses Cloudflare. This includes internal traffic between services and PHP-FPM listeners exposed directly to a network.

Adding defense in depth with WAF attack score

WAF attack score adds a machine learning layer that scores each request for attack payloads. It is available on Business plans (cf.waf.score.class) and, with a dedicated remote code execution sub-score (cf.waf.score.rce) along with an overall score (cf.waf.score), on Enterprise plans.

Attack score complements the managed rules. It will not recognize every serialized object or smuggled FastCGI record on its own, but a working exploit chain usually needs more than one request, and the later stages carry payloads the model is trained to score:

  • Second-stage payloads. Once an attacker can run code, they still need to send commands: shell execution primitives (/bin/sh -c, system(), passthru()), PHP code evaluation (eval(), assert()) or reverse-shell strings in headers, query parameters or request bodies.
  • Webshell traffic. Attackers often drop a small PHP webshell after the initial compromise. Requests that pass operating system commands to that webshell remain visible to attack score.

Deploy protections and patch

You can find more information on how to deploy managed rules and attack score in our WAF guide. In short:

  1. Check that phpAfterShell protection is active. On the Free plan, no action is needed. On paid plans, make sure the Cloudflare Managed Ruleset is deployed and that the PHP Remote Code Execution Attack #6 rule is set to Block.
  2. Review the new rules and switch them to Block. The CVE-2026-129289, CVE-2026-15353 and CVE-2026-129506 rules are in Log mode by default. Review their matches in Security Events, then change their action to Block.
  3. Layer attack score. Create a custom rule that blocks or challenges requests with a low remote code execution score, for example cf.waf.score.rce le 20 on Enterprise plans, or cf.waf.score.class eq "attack" on Business plans.
  4. Upgrade PHP. Move to 8.2.36, 8.3.37, 8.4.28, 8.5.13 or 8.6.0. Rebuild container images and restart the PHP-FPM master or Apache so every worker loads the new binary, then verify the version that serves web requests. After upgrading, check that no php.ini, FPM pool or virtual host still sets session.upload_progress.enabled=1, because an explicit setting overrides the new default.
  5. Apply interim mitigations if you cannot upgrade right away. Set session.upload_progress.enabled=0 and limit the untrusted data you store 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. These steps reduce exposure; they do not fix the flaws.

For a prompt you can give an AI agent to inventory your PHP deployments and check each one against all seven critical CVEs, see the phpAfterShell page on Cloudflare Zero Wire.

Update every PHP runtime now

phpAfterShell turns an interrupted file write in PHP's default session handler into a path to code execution, and it arrived in the same release as six other critical flaws. With technical details now public, we expect exploit attempts to follow. Cloudflare WAF blocks known phpAfterShell attack patterns for every customer, including the Free plan, and paid plans have new rules for the PHP-FPM and SOAP flaws. The fix is still to upgrade PHP and restart the services that use it.

Referenced Vulnerabilities

CVE-2026-15353 CVSS 6.3 MEDIUM Awaiting Analysis
CVE-2026-15353 - SOAP information disclosure through malformed array dimensions
SOAP information disclosure through malformed array dimensions. The SOAP extension reads an uninitialized array position when decoding an encoded array whose arraySize attribute is empty, whitespace-only or non-numeric, or when such dimensions come from a WSDL definition. Four bytes of unrelated heap data can then be used as an integer key in the decoded array. An unauthenticated remote client can trigger this with a crafted request to a SoapServer endpoint, and a malicious SOAP server with a response to SoapClient. Heap memory is disclosed only if the application returns or otherwise exposes the decoded array. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129506 CVSS 6.3 MEDIUM Awaiting Analysis
CVE-2026-129506 - SOAP use-after-free when processing DTD entity references
SOAP use-after-free when processing DTD entity references. The SOAP extension frees the document type definition (DTD) of a parsed XML document while attribute values can still refer to entities it owns, and can then read freed memory. Removing the DTD also bypasses the SOAP server's rejection of documents that contain one. An unauthenticated remote attacker who can send a crafted request to a SOAP endpoint, or who controls a WSDL or schema document loaded by the application, can crash the PHP process and cause denial of service. Memory disclosure and code execution have not been confirmed. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129496 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129496 - Timezone cache use-after-free can lead to remote code execution
Timezone cache use-after-free can lead to remote code execution. In non-thread-safe builds, a diagnostic written to a file-based error_log during module startup, for example for an invalid date.timezone value or a session configuration warning, causes the timezone cache to be allocated in startup memory that is freed while a reference to it is kept. A diagnostic raised early in the first request of a worker, such as the max_input_vars warning, then accesses the freed cache. On such a deployment an unauthenticated remote attacker can crash PHP-FPM, Apache mod_php or CGI workers with a crafted request. Arbitrary code execution may be possible and has been demonstrated with known memory addresses. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129481 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129481 - Use-after-free after interrupted session shutdown
Use-after-free after interrupted session shutdown. The session extension records the filename of the executing script when a session starts. If a fatal error occurs in an application callback while the session variables are destroyed at shutdown, such as stream_close() of a user-defined stream wrapper, the pointer is retained after the request memory is freed, and a later request handled by the same worker can free the stale string. An attacker who can trigger such a failing cleanup may crash the worker or corrupt memory; code execution has not been demonstrated. This requires the filename to be allocated in request memory, for example when the script is not cached by OPcache. This issue affects PHP versions 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129474 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129474 - Use-after-free in magic method backtraces can lead to remote code execution
Use-after-free in magic method backtraces can lead to remote code execution. When collecting the arguments of a method call handled by __call() or __callStatic() for a backtrace, PHP can read stale values that may refer to freed memory. If a fatal error such as exceeding memory_limit occurs while an application enters such a call, with fatal_error_backtraces enabled (the default) and zend.exception_ignore_args disabled, a remote attacker who controls enough request data to influence memory allocation may cause memory corruption, crash the PHP worker or, with knowledge of memory addresses, execute arbitrary code. php.ini-production enables zend.exception_ignore_args, which prevents this. This issue affects PHP versions 8.5.* before 8.5.13.
CVE-2026-129289 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129289 - PHP-FPM request smuggling through an unread HTTP request body
PHP-FPM request smuggling through an unread HTTP request body. PHP does not discard the unread part of an HTTP request body at request shutdown when the application has opened php://input without reading it to the end. When the front end reuses backend connections, which is not the default in nginx or Apache (for example nginx with fastcgi_keep_conn on, or Apache mod_proxy_fcgi with enablereuse=on), PHP-FPM can parse the leftover bytes as a new FastCGI request. An unauthenticated remote attacker can use a single crafted multipart/form-data request to forge a backend request with chosen parameters such as SCRIPT_FILENAME, REMOTE_ADDR and PHP_ADMIN_VALUE, which can lead to execution of attacker-controlled PHP code. With LSAPI, subsequent requests on the connection can be disrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-129182 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-129182 - Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown
Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown. A fatal error raised while modified INI settings are restored during request shutdown can repopulate the stored fatal error backtrace after the executor has been cleaned up. The request memory is then freed, and a diagnostic emitted before executor initialization in a later request handled by the same PHP-FPM or mod_php worker can access the stale backtrace. The shutdown error requires per-path configuration of max_memory_limit, or of zlib.output_compression together with output_handler (which .user.ini can also set). The early diagnostic requires Apache per-directory configuration or, for PHP-FPM, a PHP_VALUE or PHP_ADMIN_VALUE parameter sent by the front end. This can cause memory corruption and worker crashes, and may allow remote code execution. This issue affects PHP versions 8.5.* before 8.5.13.
CVE-2026-126714 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-126714 - Partially overwritten session files can lead to remote code execution
Partially overwritten session files can lead to remote code execution. The files session save handler, which is the default, writes updated session data into the existing session file without first clearing it. If a write is interrupted, the file can contain the beginning of the new session followed by the end of the old one, and bytes of an ordinary string can later be unserialized as objects. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-115560 CVSS 9.2 CRITICAL Awaiting Analysis
CVE-2026-115560 - Session serializer mismatch can lead to remote code execution
Session serializer mismatch can lead to remote code execution. Session upload progress, when enabled, can store attacker-controlled data in a session key using the php_binary or php_serialize session serializer. If the same session is later read with the php serializer, because session.serialize_handler is changed at runtime or differs between applications sharing a session store, bytes inside the key can be passed to the unserializer. A remote attacker able to submit a multipart upload can inject objects, which may lead to code execution when the reading application contains a suitable gadget chain, or to session corruption or denial of service. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
CVE-2026-109619 CVSS 9.8 CRITICAL Analyzed
CVE-2026-109619 - PHP Stale Internal Request-State Vulnerability - [Actively Exploited]
PHP has various global state that temporarily points into request memory. In some scenarios, global state may not be correctly reset, or may be repopulated after being reset. The global state may then refer to request memory even after it has been freed. Subsequent requests may read or branch on this stale state before it is fully initialized. Multiple strategies can trigger this condition and produce remote code execution (RCE).
CVE-2026-109618 CVSS 9.8 CRITICAL Analyzed
CVE-2026-109618 - PHP Memory Corruption Vulnerability - [Actively Exploited]
PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. Some contexts may not properly account for this scenario and leave request memory in an uninitialized state before performing an allocation. The subsequent request cleanup procedure may read or branch on this memory. Multiple OOM strategies can consistently trigger this condition and lead to remote code execution (RCE).
CVE-2023-50387 CVSS 7.5 HIGH Modified
CVE-2023-50387 - BIND DNSSEC CPU Denial of Service Vulnerability
Certain DNSSEC aspects of the DNS protocol (in RFC 4033, 4034, 4035, 6840, and related RFCs) allow remote attackers to cause a denial of service (CPU consumption) via one or more DNSSEC responses, aka the "KeyTrap" issue. One of the concerns is that, when there is a zone with many DNSKEY and RRSIG records, the protocol specification implies that an algorithm must evaluate all combinations of DNSKEY and RRSIG records.