---
title: "Cloudflare deploys protections against php2shell vulnerability"
slug: cloudflare-deploys-protections-against-php2shell-vulnerability
url: https://listedarticles.com/articles/cloudflare-deploys-protections-against-php2shell-vulnerability
canonical_url: https://blog.cloudflare.com/php-vulnerabilities-waf-protection/
content_type: blog_post
language: en
published_at: 2026-10-21T13:56:45.000Z
updated_at: 2026-10-21T17:16:37.476Z
author: "Daniele Molteni, Dan Jones, Kuber Nandwani"
authored_by: human
publisher: "Cloudflare"
publisher_url: https://www.cloudflare.com/
topics: ["Security", "Infrastructure"]
license: all-rights-reserved
word_count: 1162
reading_minutes: 5
citation: "Daniele Molteni, Dan Jones, Kuber Nandwani, Cloudflare. \"Cloudflare deploys protections against php2shell vulnerability.\" 21 Oct 2026. https://blog.cloudflare.com/php-vulnerabilities-waf-protection/ (all-rights-reserved)"
# The full text follows. The web page shows an extract and sends readers
# to the source above; quote the citation and link the canonical URL.
---

# Cloudflare deploys protections against php2shell vulnerability

> Cloudflare describes the default WAF Managed Ruleset protections it deployed for the newly disclosed php2shell PHP vulnerabilities ahead of public disclosure, how the rules detect exploitation attempts, and why customers should still update PHP while keeping the protection enabled.

# Cloudflare deploys protections against php2shell vulnerability



[Daniele Molteni](https://blog.cloudflare.com/author/daniele/), [Dan Jones](https://blog.cloudflare.com/author/dan-jones/), and [Kuber Nandwani](https://blog.cloudflare.com/author/kuber-nandwani/)

5 minute read

![](https://blog.cloudflare.com/_image?href=https%3A%2F%2Fblog.cloudflare.com%2F_emdash%2Fapi%2Fmedia%2Ffile%2F01KXQSMGN3Z955B45GCJR4REK3.png&w=1999&h=1125&f=webp&fit=cover&position=center)

Today, Calif.io, Wiz, OpenAI and Quarkslab disclosed twovulnerabilities in PHP, tracked as CVE-2026-109618 and CVE-2026-109619 and known as [php2shell](https://www.php.net/archive/2026.php#2026-10-21-5). The vulnerabilities affect all web servers running PHP 5.4 or later and they may allow an attacker to cause denial of service, remote code execution, and data exposure when an application processes specially crafted HTTP traffic.

Cloudflare has been part of a coordinated effort to deploy mitigations to protect the Internet, working with [PHP foundation](https://thephp.foundation/blog/2026/10/21/todays-php-security-release-and-how-were-strengthening-php-security/), [OpenAI](http://openai.com/index/coordinated-disclosure-of-critical-vulnerabilities) and [Wiz](https://www.wiz.io/blog/php2shell-php-rce) among others. Cloudflare has developed and deployed web application firewall (WAF) protections since early October 2026, which were deployed about 9 hours ahead of public disclosure. **Starting on October 21 3:02 am UTC, Cloudflare customers using our free or paid WAF were protected by default against php2shell.**

Cloudflare successfully deployed multiple mitigations for all its customers while the vulnerability was leaked before the official release date and we observed attack traffic targeting our customers. We observed how attackers were mutating the attack payload to try to bypass our protections by tracking the volume of matches and cross-referencing with the rule logic.

Protecting against php2shell required more than standard request-based rules. Request data alone does not always provide enough evidence to distinguish an exploit from legitimate traffic. The origin’s response adds context, helping identify whether an exploit succeeded while reducing the risk of false positives.

To deliver this protection, we developed full transaction detection, a new Cloudflare WAF capability that combines signals from the request and response within the same HTTP transaction. Response rules can then block a matching origin response before it reaches the requester. The php2shell protections are the first managed detections we have released using this capability.

Customers should patch their PHP repos even with WAF protections providing an additional layer of defense-in-depth mitigation. Our security analysts continue monitoring attack activity and update the rules when and if new techniques and variations emerge in the hours and days ahead. You can track new rules in the [changelog](https://developers.cloudflare.com/waf/change-log/changelog/).

The protections are available and deployed automatically on all plans with WAF deployed, including Free users.

## What we know about the vulnerabilities

PHP is used by almost [70% of websites](https://w3techs.com/technologies/details/pl-php). The php2shell vulnerabilities affect the PHP runtime itself and can allow attackers to execute malicious code on vulnerable servers, expose customer data, or disrupt services. Because PHP underpins widely used platforms such as WordPress and Magento, these flaws could potentially affect a large number of applications across the Internet.

The two vulnerabilities involve how PHP handles memory when something goes wrong while processing a HTTP request. Normally, PHP allocates memory to store the data it needs to process a request, then releases it when that work finishes. If processing stops unexpectedly, for example because it runs out of memory, PHP fails to clean up the memory safely. These vulnerabilities arise when PHP handles an error and then tries to use data that was not fully set up or memory that has already been released.

An attacker can send specially crafted HTTP requests to trigger these conditions. Large requests are one way to put memory under pressure, but the problem goes beyond consuming server resources. By manipulating the data PHP encounters in this invalid memory, an attacker may be able to crash a PHP process, expose sensitive information, or execute code provided by the attacker.

The two vulnerabilities differ in when the unsafe memory access happens:

|  |  |
| --- | --- |
| Vulnerability | What goes wrong |
| CVE-2026-109618 | PHP runs out of memory and interrupts its work before some internal data has been properly initialized. During cleanup of that request, PHP may use this unfinished data as though it were valid. |
| CVE-2026-109619 | A fatal error interrupts a request, leaving PHP holding references to memory that is released when the request ends. When the same PHP process handles a later request, it may follow those outdated references and access memory that is no longer valid and expose sensitive data. |

These flaws are in the PHP runtime, so updating website code or a plugin(s) alone does not fix these vulnerabilities. Administrators need to update the PHP software running their applications. If a hosting provider manages PHP, ask the provider to apply the security update.

Administrators can follow the PHP advisory for affected versions and remediation instructions. Keep Cloudflare WAF protections enabled while patching. Restricting unnecessary uploads and limiting upload sizes can also reduce exposure, but these measures do not replace the PHP fix.

## New rules

For Free customers, new rules have been released under the Cloudflare Managed Free Ruleset (Ruleset ID 77454fe2d30c4220b5701f6fdfb893ba). Free customers don’t have to take any actions to enable the protection. To override the ruleset behavior you can refer to our [documentation](https://developers.cloudflare.com/waf/managed-rules/).

|  |  |
| --- | --- |
| Rule Description | Rule ID |
| Generic Rules - Anomalous Execution - 1 | 4e315666e8e344cdb64119a3b5ccf32f |
| Generic Rules - Anomalous Execution - 2 | 00c10e6cc4da4bd08722adeebcd95984 |
| Generic Rules - Anomalous Execution - 3 | 48ddf592361e4fdb97a8a85982dab691 |
| Generic Rules - Anomalous Execution - 4 | 3556683d512a47f2937899c524b1a4c6 |
| Generic Rules - Anomalous Execution - 5 | da07c85852e34625bb478496302ede46 |
| Generic Rules - Anomalous Execution - 6 | 19373a83abb840e18ab3ce5a7975ce1b |
| Generic Rules - Anomalous Execution - 7 | 07f0b6ddaabf40b1b2042dade8d613fa |

Protection for paid plans has been released as part of the Cloudflare Managed Ruleset (Ruleset ID efb7b8c949ac4650a09736fc376e9aee). If you are on a Professional, Business, or Enterprise plan, review your Managed Ruleset deployment to confirm it’s [deployed](https://developers.cloudflare.com/waf/managed-rules/deploy-zone-dashboard/) block mode.

|  |  |
| --- | --- |
| Rule Description | Rule ID |
| Generic Rules - Anomalous Execution - 1 | c1d409ad838f47f59446f21cc438d5dd |
| Generic Rules - Anomalous Execution - 2 | f9a45927414245e3a64bb12d0a0c2f64 |
| Generic Rules - Anomalous Execution - 3 | 771c654ae1154d4daa72f4e1545d163c |
| Generic Rules - Anomalous Execution - 4 | 217005865f0145f392300bac212afcc9 |
| Generic Rules - Anomalous Execution - 5 | 38efdb17ea594501bb55a1d71867b12e |
| Generic Rules - Anomalous Execution - 6 | 4148ae686fdb4d01be673fab9d9c073d |
| Generic Rules - Anomalous Execution - 7 | 1389aa259617437392ce149c48143645 |

To better identify exploit attempts, Cloudflare developed full transaction detection, a new WAF capability that analyzes both sides of the same HTTP transaction. While some malicious payloads can be identified using the request alone, the response contains useful signals that can be used to create rules with higher confidence, reducing false positives. A matching full transaction rule can block the origin response before it reaches the requester. Learn how it works in our full transaction detection [blog post](http://blog.cloudflare.com/full-transaction-waf/).

The following rules have been deployed to the new Cloudflare Managed Response Firewall Default for customers on all plans, including Free:

|  |  |
| --- | --- |
| Rule Description | Rule ID |
| Default block for High confidence Signatures | afffe22785674c80a31875c848d2242a |

Note: rule descriptions will be updated soon.

## Review events and customize protection

To analyze blocked requests, visit **Security > Security Analytics > Events**. Filter by the rule IDs in the table above and inspect the matched request, action, and path. Events identify whether the action came from a managed or custom rule. Customers who need to tailor the protection can [update the scope](https://developers.cloudflare.com/waf/managed-rules/reference/cloudflare-managed-ruleset/#deploy-in-the-dashboard) of the Managed Ruleset to the parts of an application where it is relevant.

## Update PHP and keep the protection enabled

Cloudflare customers using our Managed Ruleset are protected by default. We recommend following the [advisory](https://www.php.net/archive/2026.php#2026-10-21-5) recommendation and applying the vendor update to your PHP repos as soon as possible while keeping the WAF protection enabled as an additional protection. Our WAF analysts will continue to update protections as new techniques emerge.
