Skip to content

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

Cloudflare 6 min read Announcement mediumAdept

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

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.

Assumes: Ruby string encodingsRack middlewareheap buffer overflowsweb application firewalls

Related posts

  • Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos

    Sourcegraph mediumAdept

    Ruby2Shell (CVE-2026-132825) is a critical heap overflow in Ruby's string case conversion that researchers say default Rails and classic Sinatra apps expose without authentication, with remote code execution proofs of concept known. Fixed releases are 3.3.14, 3.4.13 and 4.0.10, and the hard part is finding which interpreter actually runs, because Dockerfiles, .ruby-version, Gemfile and Gemfile.lock can disagree and vendor products may bundle their own Ruby. Sourcegraph gives regex Code Search queries for affected version pins, a Deep Search prompt to reconcile pins per repo, and an Agentic Batch Changes prompt to bump exact pins within each series. Floating tags, unresolved build args and Ruby 3.2 or earlier are flagged for rebuild, review or migration rather than edited automatically.

  • 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.

  • Docker patches Java4Shell and the NGINX HTTP/2 with Docker Hardened Images

    Docker mediumAdept

    Java4Shell (CVE-2026-114938) is a HotSpot memory-corruption bug in the AVX-512 VBMI Base64 decoding intrinsic that writes up to 62 bytes past a heap buffer, enabling heap disclosure and pre-auth RCE in apps like Keycloak and Jenkins on Java 17.0.6+ running on affected x86-64 CPUs. Exposure requires a vulnerable Java version, an AVX-512 VBMI host, and attacker-controlled Base64 input. The guidance covers checking CPU flags and runtime versions in shell-less images, tracking which vendor builds are fixed, and applying -XX:-UseBASE64Intrinsics as a stopgap. That flag must be set via JAVA_TOOL_OPTIONS or JDK_JAVA_OPTIONS, not JAVA_OPTS, with care around FIPS images, Java 8 and child JVMs, then verified on the running process; NGINX HTTP/2 fixes ship in 1.30.7 and 1.31.9.

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

    Cloudflare mediumAdept

    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.

  • Making Open Source Safer for Everyone with Shopify’s Bug Bounty Program

    Shopify Engineering mediumAdept

    A Shopify bug bounty report showed that a leaked Rails development secret could be escalated to remote code execution because ActiveSupport's MessageEncryptor deserialized data with Marshal by default. Shopify patched its app to use JSON serialization, then contributed Rails changes making JSON the default serializer for MessageEncryptor and MessageVerifier starting in 7.1, with an upgrade path for existing apps. It also shares a patch that hooks Marshal.load and Marshal.dump in development and CI to flag unexpected calls from gems, tracking and deprecating Marshal use across an application.

The quest for software engineering knowledge.

Look:
Layout: