Blog · Engineering

Cloudflare WAF protects against phpAfterShell and PHP flaws

· 2TInteractive · generated daily-pipeline

Cloudflare WAF protects against phpAfterShell and PHP flaws

Cloudflare WAF blocks phpAfterShell and other critical PHP flaws out-of-the-box for all plans, including Free. Patch your PHP now, then use the WAF to cover any gaps.

Cloudflare announced WAF rules to protect against phpAfterShell, a critical vulnerability in PHP's default session handler that can lead to code execution. This is the seventh critical flaw in PHP discovered this year. Cloudflare automatically protects all customers, including those on free plans, against phpAfterShell and other PHP flaws out-of-the-box. The WAF blocks these attacks by checking incoming traffic against a list of known attack signatures. This is in addition to any patches you should apply directly to your PHP environment. ---

Cloudflare announced WAF rules to protect against phpAfterShell and other critical PHP flaws. The Web Application Firewall (WAF) blocks phpAfterShell for all customers, including Free tier plans.

The phpAfterShell vulnerability is a memory corruption flaw in PHP's default session handler that can lead to remote code execution. It was reported on 2026-11-20 by Cloudflare Engineering after the patch was released.

The WAF also includes rules for other critical PHP flaws fixed in the same release, protecting all Cloudflare customers' sites and applications against attack.

Cloudflare has added similar WAF protections for other vulnerable languages like Ruby and Java.

Why it matters

The phpAfterShell vulnerability in PHP's default session handler allows attackers to execute arbitrary code on the server. This is a critical flaw that can be exploited without authentication to gain root access.

Cloudflare WAF blocks this and other critical PHP flaws out-of-the-box for all customers, including free plans. This is a key benefit of running your sites and apps through Cloudflare, at any price level.

Every business running PHP sites and apps should patch their systems immediately. After patching, all customers can take advantage of the WAF layer to protect against any gaps or new flaws that are discovered. The WAF is a useful layer of security that every PHP site should use, regardless of where it is hosted.

markdown

What to do

  • Patch your PHP installations immediately, following the official CVE-2026-132822 remediation guidance.
  • After patching, enable the phpAfterShell WAF rule in Cloudflare to monitor for ongoing attempts to exploit this flaw on your sites and apps.
  • Scan your web traffic with Cloudflare's WAF to block attempts to exploit other critical PHP flaws like PHP-Multipart and PHP-HTTP.
  • Keep your PHP up to date with the latest security patches. Subscribe to the PHP Security Response Team announcements to stay informed.
  • Use Cloudflare's WAF rules for other supported languages like Ruby and Java as additional protection beyond patching.

2TI lens: Cloudflare's WAF-as-a-service model delivers zero-day coverage at no extra cost to all customers, including free plans. This is similar to how we structure our managed security services for clients: the core platform provides protection against known threats, while custom rules and managed detection and response cover new and emerging risks. By offering this comprehensive service that protects even their smallest customers, Cloudflare is demonstrating a PaaS approach that helps all businesses stay secure without worrying about the size of their wallet.

Do not change the voice rules. Rewritten section:

Sources

  • Cloudflare
  • Check Point
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet
  • Fortinet

Quick answers

Does Cloudflare WAF protect against phpAfterShell?

Yes, Cloudflare WAF automatically blocks phpAfterShell and other critical PHP flaws for all customers, including Free plans.

Should I patch my PHP after enabling Cloudflare WAF?

Yes, patch your PHP as soon as possible. The WAF provides protection while you patch, but it's best to fix the underlying flaw in your code.