Skip to content

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

Cloudflare 9 min read Incident mediumAdept

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

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.

Assumes: JVM basicsBase64 encodingWAF conceptsheap buffer overflows

Related posts

  • Java4Shell (CVE-2026-114938): how to find every vulnerable JDK across your repos and servers

    Sourcegraph mediumAdept

    Java4Shell (CVE-2026-114938) is a CVSS 9.2 heap overflow in HotSpot's AVX-512 VBMI Base64 decoding intrinsic. When input ends in padding, a miscalculated store mask writes a full 64 bytes, so any untrusted Base64 path (auth headers, JWTs, SAML, uploads) can reach it on OpenJDK 17.0.6+ running on affected x86-64 CPUs. Exposure depends on which node a workload lands on, so every JDK 17+ should be treated as vulnerable. The post gives regex Code Search queries for Dockerfiles, package installs, Helm charts and CI workflows, plus a remediation checklist. Use -XX:-UseBASE64Intrinsics rather than -XX:UseAVX=2, which breaks ARM. Then patch pre-auth tools first, chase bundled JDKs, restart JVMs, rotate secrets and hunt for hs_err logs.

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

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

  • Enabling QR codes in Internet Explorer, or a story of a cross-platform memory disclosure

    Google Project Zero hardMaster

    A shared bug in PostScript font engines let a Charstring program read uninitialized memory. Executing "get" on a transient array entry that was never written with "put" copied leftover heap or kernel pool bytes onto the operand stack. The flaw affected ATMFD.DLL in the Windows kernel, Adobe Reader, DirectWrite, WPF and Oracle Java (CVE-2015-0089, -3049, -1670, -2619). An exploit font renders each of the 1024 leaked bits of the 32-entry transient array as 64x64 squares in a glyph. Internet Explorer then reads them back through HTML5 canvas getImageData, yielding a remote memory disclosure useful for defeating ASLR. Chrome and Firefox were protected because the OpenType Sanitiser bans the get/put instructions.

The quest for software engineering knowledge.

Look:
Layout: