Skip to content
Memory corruption Write-up Advanced

Java4Shell (CVE-2026-114938): Pre-auth RCE in OpenJDK, and the challenge of image and feature bloat

A heap out-of-bounds write in OpenJDK's AVX-512 Base64 decoder can be triggered by a malformed Base64 token, allowing a remote unauthenticated attacker to overwrite heap memory and potentially achieve remote code execution. The flaw affects Java 17 and later on x86-64 CPUs with AVX-512 VBMI, and working exploits were demonstrated against several products.

webflow.sysdig.com

Published on webflow.sysdig.com

linkedin

The author, on webflow.sysdig.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The hand-rolled assembly that handles the padded tail of Base64 input miscalculates the output length for certain inputs, causing a write mask to open fully and write beyond the intended buffer.

Impact

A remote unauthenticated attacker could overwrite heap memory, leak it, and in tested products achieve remote code execution, though exploitation requires per-target heap grooming and is sensitive to network latency; request buffering (e.g., nginx default) can break some chains but is not a general mitigation.

What the attacker needed

X86-64 CPU with AVX-512 VBMI; Java 17.0.6 or later; Network access to a login endpoint; JIT warm-up traffic

The fix

Oracle and OpenJDK shipped fixes in builds ending in .1; as a bridge, the JVM flag -XX:-UseBASE64Intrinsics disables the vulnerable intrinsic.

How it was found

  1. Warm up the JIT compiler so the Base64 decoder is compiled.
  2. Send a malformed Base64 token (64 'A' characters followed by '=') to a login endpoint that decodes it before validation.
  3. Use the fixed overwrite to corrupt a neighbouring array's length, creating a buffer that accepts chosen bytes.
  4. Repeat to obtain a reader, combine writer and reader to leak heap memory, and then achieve code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A part of Java that decodes Base64 text (a way to represent binary data as letters) has a bug when it processes certain malformed input. An attacker can send a specially crafted login token to corrupt memory and, in some cases, run their own code on the server. Only servers running on certain modern Intel or AMD chips are affected.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.