Quantro Security

Java4Shell: We Verified OpenJDK's Pre-Auth AVX-512 Base64 Heap Overflow (CVE-2026-114938) on Real Silicon — Here's the Evidence

Quantro Security · Quantro Security
November 18, 2026

On November 17, 2026, Oracle shipped its Critical Security Patch Update and the research firm Calif went public with “Java4Shell” — CVE-2026-114938, a reported pre-auth remote code execution flaw in Java itself, scored 9.2 under CVSS 4.0. The reporting pointed at something unusual: not a library, not a framework, but a four-line assembler stub inside HotSpot — the AVX-512 hardware acceleration for java.util.Base64 decoding that only exists on modern x86-64 CPUs. Within a day, our exploit pipeline had verified it end-to-end on real Sapphire Rapids silicon: the exploit deterministically corrupts the Java heap on vulnerable Temurin 17.0.12, the documented mitigation flag closes it at every gate. This post shows the evidence, the measured truth table behind the public shorthand, and the production check we shipped alongside.

What the bug is

java.util.Base64$Decoder.decode0 hands bulk decoding to decodeBlock, an @IntrinsicCandidate method. On CPUs with AVX-512 VBMI+BW — Intel Ice Lake/Sapphire Rapids or later, AMD Zen 4 or later — HotSpot replaces it with the stub at src/hotspot/cpu/x86/stubGenerator_x86_64.cpp. The stub decodes 64-character chunks vectorized, then handles the final leftover fragment at a label the source calls L_finalBit:

__ BIND(L_finalBit);
// Now have 1 to 63 bytes left to decode
__ movl(output_size, length);
__ shrl(output_size, 2);       // (len / 4)
__ lea(output_size, [output_size + output_size*2]);   // * 3
// Strip pad characters, if any:
__ cmpb(Address(source, length, times_1, -1), '=');
__ jcc(equal, L_padding);
...
__ BIND(L_padding);
__ decrementq(output_size, 1);

output_size = (len/4)*3. For a fragment shorter than one complete Base64 block — fewer than 4 characters — that is 0. If the fragment ends in padding, the code decrements it to -1. The stub then computes the byte mask for its masked vector store:

__ movq(output_mask, -1);
__ bzhiq(output_mask, output_mask, output_size);  // index now huge
...
__ evmovdqub(Address(dest, dp), k1, tmp, true, AVX_512bit);

BZHI with an index larger than 63 keeps every lane, so the mask covers a full 64-byte store — while the caller sized the destination array exactly to the expected output (3*((n+3)/4) - paddings, a 386-byte array for our input). The store lands past the array end into whatever the Java heap holds next.

The fix, JDK-8393212 — four lines, already in OpenJDK 27.0.1.1 — simply refuses the vectorized tail for fragments shorter than one complete block:

// A padded Base64 tail shorter than one complete block is handled by Java.
__ cmpl(length, 4);
__ jcc(Assembler::less, L_bruteForce);

Two properties make this a clean, demonstrable primitive. The write is pre-auth: it happens inside decode(), before Java validation rejects the malformed tail, so any request path that feeds attacker-controlled Base64 into the basic or URL decoder before authentication completes reaches it. And the bytes written are a fixed value (0x69, derived from the stub’s filler lanes) — independent of attacker input — which is why the reporter’s RCE escalation needs per-application heap grooming rather than a classic controlled write.

The verification

The pipeline needed real silicon: the vulnerable intrinsic only executes on AVX-512 VBMI hardware, so we ran the solve on a dedicated Sapphire Rapids host (Eclipse Temurin 17.0.12+7, UseAVX=3, UseBASE64Intrinsics=true) — a shape no CI sandbox or Apple-Silicon laptop can reproduce. The detection is a guard-array content differential: decode into a destination sized exactly per the JDK’s own decodedOutLength, with a canary array allocated immediately after it, then scan the canary after the expected IllegalArgumentException.

--- VULNERABLE eclipse-temurin:17.0.12_7-jdk (AVX-512 VBMI) ---
  tail Q=   OVERFLOW trial=0 guard[0]=0x69 len=386
  tail =    OVERFLOW trial=0 guard[0]=0x69 len=386
  tail AB=  silent (in-bounds tail write only)
  tail ==   silent

--- CONTROL -XX:-UseBASE64Intrinsics, same build ---
  every tail: silent, guard intact

--- automated verification ---
  result: verified
  benign-input control:  clean — a well-formed payload produced no effect,
                         the signal is exploit-specific
  patched-build control: holds — the mitigated build did not reproduce
  image: eclipse-temurin@sha256:11b466a4… digest-pinned, hermetic

One empirical correction to the public shorthand (“62 bytes for a = tail, 63 for ==”): on 17.0.12 the overflowing shapes are a one-data-char-plus-pad fragment (Q=) or a lone pad (=); the three-character fragments (AB=, A=, ==) write only in-bounds tail bytes. A reproduction harness should also allocate fresh destination+canary per trial — the single-shot attack is one dice roll on heap adjacency, which is why some public reproductions may look flaky. Ours fires at warm trial 0.

The full run — intel gathering, exploit authoring, a Docker lab running the genuine vulnerable JDK, and both integrity controls, with the repair journal — cost about $1.70 of automated research time across all attempts. Every artifact and the full technical writeup are retained in our research records.

What this means in practice

Who is exposed: internet-facing Java 17+ (and 21/25/27) services on x86-64 AVX-512 hosts — API gateways, identity and SSO services, anything that decodes client Base64 (Basic-auth components, JWT or base64 body fields) before authentication completes. Products that bundle their own JDK wait on the product vendor, and container images keep the old runtime until rebuilt.

Who is not: ARM hosts (Graviton, Ampere, Apple Silicon), x86 without AVX-512 VBMI (Skylake, Cascade Lake, AMD Zen 2/3 — many hyperscaler defaults), Java 8 and 11 (no Base64 decode intrinsic), and MIME-decoder routes (the stub bails to pure Java for isMIME). Jackson, JJWT, Nimbus and Commons-Codec carry their own pure-Java decoders and are unaffected.

Remediation: patch to a vendor build carrying JDK-8393212 (Oracle November 2026 CSPU: 17.0.21.1 / 21.0.13.1 / 25.0.5.1; OpenJDK 27.0.1.1+). Verify your distribution actually carries the backport — at disclosure time the public jdk17u/jdk21u/jdk25u repositories had not picked it up, so a high version number alone is not proof. If you cannot patch yet, either flag closes the vulnerable path at a modest decode-throughput cost: -XX:-UseBASE64Intrinsics or -XX:UseAVX=2.

On the RCE claim: the reporter states the overflow composes with per-application memory behavior into pre-auth RCE in six named products (Keycloak, Jira, Confluence, Artifactory, Jenkins, PingFederate). No public PoC of that escalation exists, and the overflow content is a fixed value — a per-target research exercise, plausible as claimed, not reproducible from public material. Treat the pre-auth crash (a guaranteed denial of service on any reachable vulnerable JVM) plus the RCE claim together when you prioritize.

The check we shipped

The companion Detection check fires the crafted fragment at candidate pre-auth Base64 surfaces (a JSON data field, the Authorization: Basic header) and proves a payload-specific JVM death, bracketed by its own controls: the service must answer a liveness probe first, and must survive an identical well-formed Base64 probe before the destructive one. A patched or mitigated target answers 400 and stays alive — the check stays silent. Because the proof primitive is a JVM crash, the check is deliberately classified as destructive and only runs when an operator explicitly authorizes it — destructive on purpose, never by accident, and validated against both a vulnerable and a fixed build so it can never fire on a patched one.

How Quantro can help

If you are running Java 17+ on AVX-512 hardware, the sequence that matters is find it, prove it, fix it — and Quantro runs all three:

  • Identify vulnerable versions from your existing inventory. Quantro reasons over the asset and software data you already collect to pinpoint the Oracle Java SE, GraalVM, and OpenJDK builds in scope — and narrows to the hosts where the intrinsic actually executes (x86-64 with AVX-512 VBMI), so you are not chasing ARM or non-AVX-512 machines that cannot be reached.
  • Validate real exposure with Quantro Scanners. The companion Detection check (above) fires the crafted fragment at candidate pre-auth Base64 surfaces and proves a payload-specific JVM death — separating a theoretically vulnerable version string from a genuinely reachable, exploitable one, under explicit authorization and its own safety controls.
  • Remediate with Quantro. Drive the fix to the confirmed-exposed hosts — the vendor build carrying JDK-8393212, or the -XX:-UseBASE64Intrinsics / -XX:UseAVX=2 mitigation where you cannot patch yet — and verify it closed.

Sign up for a free assessment trial →

Affected versions

Per Oracle’s November 2026 Critical Security Patch Update, the affected (and earlier) releases are:

  • Oracle Java SE: 8u511-perf (8u511b33-perf), 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, 27.0.1.0.3
  • Oracle GraalVM for JDK: 17.0.21.0.3, 21.0.13.0.3
  • Oracle GraalVM Enterprise Edition: 21.3.20.0.3
  • OpenJDK: 27.0.1.0.3, 25.0.5.0.3, 21.0.13.0.3, 17.0.21.0.3, 11.0.33, 8u512, and earlier

The flaw only executes on x86-64 hosts with AVX-512 VBMI+BW (Intel Ice Lake/Sapphire Rapids or later, AMD Zen 4 or later) and in the Base64 intrinsic path — see What this means in practice above for who is and isn’t reachable. As noted there, a high version number alone is not proof of the fix: verify your distribution actually carries the JDK-8393212 backport.

References

See also

This verification was produced by Vulnerability Research Labs, a research unit of Quantro Security. Our work here is independent reproduction and evidence generation; the vulnerability was reported by Calif in coordination with Oracle and the OpenJDK project.