Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Cloudflare 9 min read Announcement mediumAdept

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

phpAfterShell (CVE-2026-126714, CVSS 9.2) lets an interrupted write in PHP's default file-based session handler leave a mixed session file. If an attacker controlled the old data, for example through session upload progress, PHP can deserialize objects the attacker chooses and possibly execute code. PHP fixed it in 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0 alongside six other critical flaws, including FastCGI request smuggling in PHP-FPM via connection reuse and several use-after-free bugs. Cloudflare's existing PHP RCE managed rule (Block, including Free plan) now covers phpAfterShell, and three new Log-mode rules target the PHP-FPM and SOAP CVEs. The WAF cannot see the deserialization step, session data from other sources, server-state bugs or traffic that bypasses it, so the real fix is to upgrade and restart all workers. Until then, disable session.upload_progress, turn off FastCGI keep-alive and set fatal_error_backtraces=0.

Related posts

  • php2shell: patching PHP is easy, finding it is the hard part

    Sourcegraph mediumAdept

    PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two unauthenticated RCE memory-safety bugs (CVE-2026-109618/109619, dubbed php2shell) in the request lifecycle, reachable on mod_php via a crafted multipart POST before application code runs. PHP 8.1 and older get no fix. The hard part is inventorying every PHP runtime across Dockerfiles, OS package installs, Helm charts, CI workflows and Composer pins, and concrete regex searches are given for each. Remediation order: patch internet-facing mod_php first, restart workers, rotate credentials the web user can read, preserve forensics, rebuild images, and isolate EOL hosts. The rest is a pitch for Sourcegraph Deep Search and Agentic Batch Changes to automate the inventory and version bumps.

  • The WordPress Chain Massacre

    Calif hardMaster

    wp2root extends AssetNote's wp2shell pre-auth WordPress RCE from constrained PHP execution to native code execution and Linux root. It exploits a legacy PHP Serializable recursive-unserialize use-after-free for arbitrary read, builds a self-resolving ROP chain, loads a helper via memfd, and uses the Copy Fail page-cache overwrite of setuid /usr/bin/su for a fileless root transition. The chain is designed to survive hardened hosts with disable_functions and read-only filesystems, and the authors say Codex helped produce it in under an hour.

  • How Cloudflare WAF helps protect against Java4Shell (CVE-2026-114938)

    Cloudflare mediumAdept

    Java4Shell (CVE-2026-114938, CVSS 9.2) is a memory-corruption bug in OpenJDK's AVX-512 Base64 decoder intrinsic. Malformed padding at the tail produces a negative length that becomes a 64-byte write, overflowing the output array: 64 'A's plus '=' write 62 bytes past a 50-byte buffer, and the overflow happens before Java rejects the input. Calif chained it into heap leaks and RCE against Keycloak, Jira, Jenkins and others, but only on OpenJDK 17.0.6+ running on x86-64 CPUs with AVX-512 VBMI. Cloudflare shipped managed WAF rules in Log mode plus attack-score guidance, and says patching or the -XX:-UseBASE64Intrinsics / -XX:UseAVX=2 flags are the real fix because non-HTTP, outbound TLS and internal paths bypass any WAF.

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

    Cloudflare mediumAdept

    ruby2shell (CVE-2026-132825) is a heap buffer overflow in Ruby's string case conversion: in 14 legacy single-byte encodings, uppercasing the German ß writes two bytes (SS) but reserves room for one, so 21 sharp s characters overflow by a byte, with proofs of concept reaching remote code execution. Default Rails and classic Sinatra apps are exposed before authentication because Rack's MethodOverride middleware upcases the `_method` parameter, which an attacker can send in a legacy charset via a multipart POST. Cloudflare added Block-by-default managed rules for this CVE and the related integer overflow GHSA-87fm-7w84-j2px on all plans, and suggests attack-score custom rules as extra defense. It stresses that the WAF cannot see direct-to-origin, internal or non-HTTP paths, so upgrading to Ruby 3.3.14, 3.4.13 or 4.0.10 and restarting all processes is the real fix.

  • Well, That Wasn't Fun: October 16 '26

    Fly.io mediumAdept

    A Linux kernel bug in IPv4 checksum offload validation let a guest VM direct the host to write its computed checksum into an already-trusted IPv4 header field. This enabled a firewall bypass and a 32-byte out-of-bounds read that could leak host memory or packets from neighboring VMs. XDP rules ran too early to catch the rewrite, and disabling offload required a reboot anyway, so Fly.io patched and rebooted its entire fleet in 10 hours. Reboots were sequenced in waves so no Managed Postgres cluster lost both nodes (17 waves in iad), with some hosts stuck in BIOS or lost to a failed power supply. The write-up also covers the decision to label the work as 'maintenance' rather than disclose vulnerability, the move of incident comms to the exec team, and advice to encrypt internal traffic, scope and expire agent credentials, and rehearse rotation.

The quest for software engineering knowledge.

Look:
Layout: