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

Daniele Molteni · 2026年11月20日

AI 摘要 AI 生成,可能有误

On November 19, 2026, researchers disclosed phpAfterShell (CVE-2026-126714), a critical remote code execution vulnerability in PHP's default file-based session handler, which PHP fixed the same day alongside 16 other flaws, six of them also rated critical. Cloudflare's WAF already blocked part of the phpAfterShell attack pattern via a rule first deployed for the php2shell vulnerabilities and was updated to fully cover it (default Block action on all plans, including Free), while three new rules for a PHP-FPM request smuggling flaw and two SOAP extension flaws were added in Log mode for paid plans. Because several of the flaws depend on server configuration or paths a WAF cannot see, upgrading PHP and restarting workers remains the only complete fix, and there is currently no indication of exploitation in the wild.

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.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 The Cloudflare Blog

Varlock is joining Cloudflare

AI 摘要Varlock, an open-source toolkit for managing environment variables and secrets, is joining Cloudflare while remaining MIT-licensed, vendor-neutral, and actively developed. Varlock's .env.schema approach provides validation, type safety, and secure declarative secret loading as a single source of truth, and planned hosted Varlock features will be redirected into Cloudflare Secrets Store instead. The article also highlights the growing urgency of secrets management in the AI era, outlining work on agentic workflows, credential brokering, and pushing .env.schema as a broader open standard.

Post-quantum cryptography is still safe

AI 摘要Anthropic published theoretical research describing quantum algorithms for the lattice problems (Module-LWE and Module-SIS) underlying post-quantum cryptography standards ML-KEM and ML-DSA, prompting Cloudflare to reassure users that deployed cryptosystems remain secure. The proposed attacks are impractical because they would require quantum computers with billions of qubits—far beyond today's technology—and have runtime so large they qualify as 'galactic algorithms,' with no practical threat indicated. Cloudflare views AI-assisted cryptanalysis as a way to strengthen confidence in cryptography by finding and addressing risks faster, and it continues its post-quantum migration, with 73% of human traffic to Cloudflare now post-quantum encrypted.

Introducing Search for Agents

AI 摘要Cloudflare has introduced Search for Agents, a feature that automatically creates an AI Search instance for a zone, crawls and indexes its content, and exposes a search API from the customer's own domain—removing the need for manual setup and integration. The search endpoint is advertised to AI agents via metadata in HTML pages or YAML front matter when Markdown for Agents is enabled, and it returns retrieved content in Markdown while natively supporting the new HTTP QUERY method. The feature is available to all customers (with limits on Free plans) and follows existing AI Search pricing and configuration options.

Probing DNS at Cloudflare

AI 摘要The article describes how Cloudflare's DNS team extended Flamingo, its internal end-to-end testing framework built in Rust with a modular architecture, to continuously probe DNS record propagation in production from every data center. The DNS module measures how quickly record changes reach authoritative nameservers and the 1.1.1.1 public resolver, feeding these measurements into SLOs and error budgets that can automatically halt or roll back releases when issues appear. This approach addresses DNS failures that are slow, distributed, and partial, and Flamingo's extensibility opens the door to testing other protocols like TCP, UDP, and WebSockets.

How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)

AI 摘要Ruby disclosed ruby2shell (CVE-2026-132825), a critical heap buffer overflow in string case conversion involving legacy single-byte encodings and the German sharp s (ß), which can enable pre-authentication remote code execution in default Rails and Sinatra applications and is fixed in Ruby 3.3.14, 3.4.13, and 4.0.10. Cloudflare WAF now blocks the vulnerability—and a related integer overflow (GHSA-87fm-7w84-j2px)—for all customers, including those on the Free plan, though the WAF is only a compensating control and upgrading Ruby remains the complete fix. Cloudflare has patched its own Ruby systems with no indication of compromise, and urges users to upgrade Ruby runtimes, rebuild container images, and update bundled products like GitLab and Mastodon before public proof-of-concept exploits appear.