CVE-2026-114938 (Java4Shell): Pre-Auth Heap Overflow in OpenJDK's Base64 Decoder

CVE-2026-114938 (Java4Shell) is a pre-auth heap overflow in OpenJDK's AVX-512 Base64 decoder. Root cause, who is affected, RCE claims, fixes and workarounds.

Last updated 18 November 2026. This is a fast-moving issue: vendor builds and exploitability findings are still coming in, and we will update this post as they do.

In short: CVE-2026-114938, nicknamed Java4Shell, is a heap-based buffer overflow (CWE-122) in the HotSpot JIT's hand-written Base64 decoder for x86-64 CPUs with AVX-512 VBMI. A malformed, padded Base64 string, the kind any login form, Authorization: Basic header or JWT can carry, makes the decoder write up to 63 bytes past the end of its output array. It needs no authentication. Oracle and OpenJDK fixed it in the 17 November 2026 updates. Patch, or turn the intrinsic off, on every x86-64 server that runs Java 17.0.6 or later.

Key facts

CVE CVE-2026-114938 ("Java4Shell")
Component OpenJDK HotSpot, compiler: the x86-64 Base64.Decoder intrinsic (decodeBlock)
Weakness CWE-122, heap-based buffer overflow
Authentication needed None
CVSS 3.1 (Oracle, OpenJDK) 8.1 High: AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 4.0 (Calif, the reporter) 9.2 Critical (vector not published)
Exploited in the wild Not reported. Not in CISA KEV; CISA's SSVC rates exploitation "none", technical impact "total"
Published 17 November 2026 (Oracle Critical Patch Update and OpenJDK advisory)
Found by Quang Luong, Calif
Fix JDK-8393212, in the November 2026 update builds

You can follow the live record, EPSS and KEV status in the CtrlSec vulnerability directory.

Are you affected?

You are exposed only when all three of these are true.

  1. A Java version with the AVX-512 Base64 decoder. That is OpenJDK 17.0.6 or later, plus 21, 25 and 27, in every distribution built from it: Oracle Java SE, Oracle GraalVM for JDK and GraalVM Enterprise, Eclipse Temurin, Amazon Corretto, Azul Zulu, Microsoft Build of OpenJDK, Red Hat OpenJDK, BellSoft Liberica, SAP SapMachine. Oracle also lists its Java SE 8 performance build (8u511b33-perf). Oracle's affected builds are 8u511b33-perf, 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3 and 27.0.1.0.3, and every earlier build that carries the decoder.
  2. An x86-64 CPU with AVX-512 VBMI. On Linux, the avx512f, avx512bw, avx512vbmi and bmi2 flags must all be present. That covers Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD EPYC and Ryzen from Zen 4 onward: many current cloud x86 instance types.
  3. The intrinsic left on. It is on by default (UseBASE64Intrinsics=true, with AVX-512 allowed).

Not affected: ARM64 (AWS Graviton, Ampere, Apple silicon); x86 CPUs without VBMI (Skylake-SP, Cascade Lake, AMD before Zen 4); OpenJDK 17.0.0 to 17.0.5; standard Java 8 and 11 builds, which in independent testing do not overflow; the MIME decoder (Base64.getMimeDecoder()); and Base64 libraries that do not call java.util.Base64.

Many teams will be on the first two lists without knowing it, because a cloud instance type decides the CPU and a base image decides the JDK.

Root cause: how a padded tail becomes a 64-byte write

java.util.Base64.Decoder.decode() sizes its output array from the input, then fills it. On hot code paths the C2 JIT replaces the inner loop, decodeBlock, with a hand-written assembly stub from stubGenerator_x86_64.cpp. On AVX-512 VBMI hardware that stub decodes up to 64 bytes per step and handles the last, partial block with masked vector loads and stores. Each byte lane is read or written only if its bit in a 64-bit mask is set.

The bug is in the last block.

  1. The stub works out how many output bytes the last block produces: three for every four input characters, minus one for each trailing =.
  2. When the leftover input is only padding, or a fragment shorter than one four-character group plus padding (=, ==, X=, XY= and so on), the count is zero before the subtraction. It then underflows to −1 or −2.
  3. The stub builds the output mask with the BMI2 instruction bzhi, which keeps the low n bits. With n that large, bzhi keeps all 64 bits, so the mask becomes all ones.
  4. A masked vmovdqu8 store then writes a full 64 bytes. The output array only had room for a byte or two more.

Calif's example is a 65-character input: 64 characters, then =. The decoded array is 50 bytes, and the last store starts at offset 48, so it runs 62 bytes past the end of the array (63 with ==). On Java 17 the stub's block layout differs, so the input must be longer: 128 characters, then the padding. Harness Lab measured the overflow directly: the fast path writes 160 bytes into a 98-byte array, while the same input with the intrinsic turned off writes 96 bytes, which fits.

What gets written matters for exploitability. The attacker controls the first byte fully and four bits of the second, and both land in bounds. Bytes 2 to 63 come from the decoder's own arithmetic, and bytes 48 to 63 are always 0x9a. So this is not a write-what-where: the attacker controls where a fixed pattern lands, by choosing the input length and grooming the heap, but not what it says.

There are two more quirks. The overflow happens on the first malformed decode after the stub is compiled. After that the JIT deoptimizes the method, and it stays safe until it recompiles. Also, the caller still sees an ordinary IllegalArgumentException for the bad input, so the application responds normally, for example with a plain 401.

The fix

The fix is JDK-8393212, titled "Base64 optimization improvements". It shipped in the 17 November builds; in OpenJDK 27 it is tag jdk-27.0.1.1-ga. It adds an early check to the stub's last-block path: when fewer than four characters remain, the stub stops and lets the Java code handle the tail, and the Java code rejects the bad padding before writing anything. The vector path never sees a length that can underflow.

How bad is it? The claims and what has been reproduced

This is where reports disagree, so here is what each source has shown.

Calif (the reporters) describe a full chain. The fixed-pattern write can corrupt the length field of a neighbouring array. That turns it into a bounded write over nearby objects, and into a heap memory disclosure, which they call "JavaBleed" and compare to Heartbleed, when the oversized array is echoed back in a response. With leaked data, the chain repairs the objects it damaged, moves on to arbitrary writes, and reaches the JIT code cache. Calif say they have pre-auth RCE in default configurations of Keycloak, Atlassian Jira and Confluence, JFrog Artifactory, Jenkins and PingFederate. They also report post-auth RCE in Apache Kafka, Solr, Elasticsearch, Gerrit and Spinnaker, and a client-side exploit against a Java program that connects to a malicious TLS server. They have withheld the product-specific chains.

Independent reproductions confirm the overflow but not RCE.

  • Harness Lab reproduced the heap corruption before authentication. With small fixed TLABs (-XX:TLABSize=2048 -XX:-ResizeTLAB) it crashes the JVM inside the G1 collector. With default heap settings, the write usually landed in unused allocation space, and a service survived thousands of triggers.
  • Endor Labs and Miggo reached the same conclusion: memory corruption and denial of service are shown, but there is no public RCE exploit or universal chain yet. Public "PoC" repositories exist; treat them as unverified.

Our read: the overflow is real, needs no login, and is reachable from ordinary input. Denial of service is plausible under some heap layouts. Code execution depends on the application and needs heap grooming, but the people who found the bug say they have done it against widely deployed products, and the details will not stay private for long. Treat internet-facing x86-64 Java services as critical and patch them first. Treat CVSS 8.1 as a floor, not a ceiling.

Where attackers reach the decoder before login

Any untrusted Base64 that reaches java.util.Base64.getDecoder() (or the URL-safe decoder) can trigger the bug. Common pre-authentication paths:

  • HTTP Basic authentication. The Authorization: Basic … header is decoded before the password is checked, in Tomcat, Jetty, Undertow, Spring Security, Quarkus, Micronaut, Vert.x, Helidon, Dropwizard, Apache Shiro, pac4j, Keycloak, Jenkins and many more.
  • JWTs. The header and payload segments are Base64URL-decoded before the signature is verified.
  • SASL exchanges, such as Kafka's SCRAM.
  • Anything else that accepts Base64 from a user: file uploads, data: URIs, webhook payloads, encoded cookies and state parameters.

Check your exposure

Check the JVM that is actually running, not the one in your image tag or on your PATH. Products often bundle their own runtime.

# 1. Does this host's CPU have the vulnerable instruction set?
grep -o -w -m1 'avx512vbmi' /proc/cpuinfo || echo "no AVX-512 VBMI: not exposed"

# 2. Which Java processes are running, and which JVM is each one using?
ps -eo pid,args | grep '[j]ava'
readlink -f /proc/<pid>/exe
jcmd <pid> VM.version

# 3. Is the Base64 intrinsic switched on for that JVM?
java -XX:+PrintFlagsFinal -version | grep -E ' (UseAVX|UseBASE64Intrinsics) '

A host is exposed when step 1 finds avx512vbmi, step 2 shows a 17.0.6+ / 21 / 25 / 27 build older than the November 2026 update, and step 3 shows UseBASE64Intrinsics = true with UseAVX = 3.

Fix it

1. Patch

Move to a build that contains JDK-8393212. Confirmed fixed builds so far: Oracle Java SE 17.0.21.1 and 21.0.13.1, and OpenJDK 27.0.1.1 (tag jdk-27.0.1.1-ga). Harness lists the whole November line as 8u513, 11.0.33.1, 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1; at the time of writing the 25.x fix was not yet in every public repository. Temurin, Corretto, Zulu, Microsoft, Red Hat and the Linux distributions ship on their own schedules, so check each vendor's advisory. Then restart every Java process, rebuild and redeploy container images, and confirm the new build with jcmd <pid> VM.version.

2. If you cannot patch today, turn the vulnerable path off

Add one JVM option. They are listed from narrowest to broadest:

# Disables only the vulnerable Base64 decode stub
-XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_decodeBlock

# Disables all hardware-accelerated Base64 (encode and decode)
-XX:-UseBASE64Intrinsics

# Last resort: disables AVX-512 for the whole JVM. x86-64 only; a JVM on ARM will not start with it.
-XX:UseAVX=2

You can set them for every Java process at once with JAVA_TOOL_OPTIONS. Confirm the setting took effect with -XX:+PrintFlagsFinal, and remove it once you have patched. Base64-heavy services will lose some throughput; most will not notice.

3. Add an input check as a backstop

At a reverse proxy, WAF or authentication filter, accept a Base64 field only if:

  • its length is a multiple of 4;
  • it uses only the Base64 alphabet;
  • padding appears only as one or two = at the very end.

Harness found that a looser "Base64 characters only" rule does not stop the overflow. This check reduces exposure but does not replace the patch.

Detection

  • Crash files: hs_err_pid*.log files showing SIGSEGV in G1 garbage-collector frames such as G1ParScanThreadState::steal_and_trim_queue, especially repeated ones on internet-facing services.
  • Input shape: Base64 values in Authorization headers, JWT segments or form fields that end in = or == while their length is not a multiple of 4, and are longer than 64 characters.
  • Errors: bursts of IllegalArgumentException from java.util.Base64 in application logs.
  • Signs of memory disclosure: responses from endpoints that echo decoded data and come back larger than they should.

Be aware that a successful trigger can look like an ordinary failed login (a 401) in access logs. Absence of evidence in logs is not evidence of absence.

Timeline

Date Event
22 Oct 2026 CVE ID reserved by Oracle
17 Nov 2026 Oracle Critical Patch Update and OpenJDK advisory published; Calif publishes its "Java4Shell" write-up
17 Nov 2026 CISA adds CWE-122 and SSVC enrichment; oss-security post
17–18 Nov 2026 Independent reproductions (Harness, Endor Labs, Miggo) confirm the overflow; RCE remains unverified publicly

FAQ

Is CVE-2026-114938 being exploited in the wild? Not as of 18 November 2026. It is not in CISA's Known Exploited Vulnerabilities catalogue. The trigger is simple and public, though, so expect scanning soon.

Is Java 8 or Java 11 affected? Standard OpenJDK 8 and 11 builds do not carry the vulnerable AVX-512 decoder and did not overflow in independent testing. Oracle does list its Java SE 8 performance build (8u511b33-perf).

Are ARM servers, AWS Graviton or Apple silicon Macs affected? No. The bug is in x86-64 AVX-512 code only.

Is this a remote code execution vulnerability? The reporters say yes, in several named products, using an application-specific chain. Independent teams have so far shown heap corruption and crashes, not code execution. Plan as if RCE is possible.

Will disabling the Base64 intrinsic hurt performance? Only for Base64-heavy workloads, and usually only a little. Use it as a stopgap until you have patched.

References