Security · · 5 min read

Java4Shell (CVE-2026-114938): An Out-of-Bounds Write in OpenJDK's AVX-512 Base64 Decoder Can Reach RCE

Calif scores the bug 9.2 under CVSS 4.0; Oracle and OpenJDK score it 8.1 under CVSS 3.1. It hits OpenJDK 17.0.6 and later on x86-64 CPUs with AVX-512 VBMI. ARM64 is not affected. Patch to 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1.

Gouache-style illustration of a pale rose wall of square niches holding cream blocks, except one terracotta block that has overshot its niche and sits over the neighboring slot
Illustration by TechPulse Editorial · The write ran past the end of the slot.
Severity
CRITICAL · CVSS 9.2
Affected
OpenJDK 17.0.6 through versions before 17.0.21.1, and all Java 21, 25 and 27 builds before 21.0.13.1, 25.0.5.1 and 27.0.1.1, on x86-64 CPUs with AVX-512 VBMI; derivatives including Temurin, Corretto, Zulu, Liberica, SapMachine, Microsoft Build of OpenJDK, Red Hat OpenJDK, Oracle Java SE and Oracle GraalVM for JDK. Java 8, Java 11 and native ARM64 runtimes are not affected.
Patched
17.0.21.1+4, 21.0.13.1+4, 25.0.5.1+4, 27.0.1.1+4, plus matching vendor builds

Java4Shell (CVE-2026-114938) landed with Oracle’s November 2026 Critical Security Patch Update at 1:00pm PT on November 17, 2026 (4:00am WIB on November 18). The OpenJDK Vulnerability Group published its advisory at the same time, and CISA followed with an alert urging organizations to patch immediately. The bug is an out-of-bounds heap write in the hardware-accelerated Base64 decoder that ships with OpenJDK. Calif.io, which found and disclosed it, also uses the name Java2Shell in some coverage.

Calif rates it 9.2 (Critical) under CVSS 4.0. Oracle and OpenJDK rate it 8.1 (High) under CVSS 3.1. The official vector is AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. Oracle’s advisory credits Quang Luong of Calif.io and Albert Yang.

What goes wrong

To decode Base64 faster, HotSpot’s C2 compiler can replace decodeBlock() with a native intrinsic that uses AVX-512 VBMI instructions on supported x86-64 CPUs. The routine walks the input in wide blocks, then a separate tail handler deals with the leftover bytes, including Base64 padding.

That tail path is where the bug sits. When the leftover fragment is malformed — a stray = that cannot form a valid group on its own — the handler can compute a negative output length. That value is then used to build a store mask. Because the mask-building instruction only looks at the low bits of the count, a negative length turns into a mask that permits a full 64-byte write, which runs past the end of the destination array.

Java still rejects the input and throws IllegalArgumentException. By then the neighboring heap may already be corrupted. Catching the exception does not undo the write. In Datadog’s standalone test, the extra bytes damaged a neighboring array header and the JVM later crashed during garbage collection. What actually gets overwritten depends on which objects sit next to the buffer.

Datadog also notes that, in the OpenJDK 17.0.6 build it tested, the AVX-512 path is used by the basic and URL decoders (Base64.getDecoder() and Base64.getUrlDecoder()). The MIME decoder (Base64.getMimeDecoder()) bypassed that path.

Who is affected

Three things have to be true at once: a vulnerable runtime, a CPU that can take the AVX-512 VBMI path, and a place where attacker-controlled data reaches that decoder.

Java lineAffectedFirst fixed release
1717.0.6 through versions before 17.0.21.117.0.21.1+4
21All builds before 21.0.13.121.0.13.1+4
25All builds before 25.0.5.125.0.5.1+4
27All builds before 27.0.1.127.0.1.1+4
8 and 11Not affected by this CVE—

The same code is in the usual OpenJDK derivatives: Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle OpenJDK, Oracle Java SE and Oracle GraalVM for JDK. Use your vendor’s matching fixed build; the build number may differ. Java 8 and 11 are not in the OpenJDK risk matrix for CVE-2026-114938, though the same November advisory patches other Java vulnerabilities on those lines.

The hardware requirement is an x86-64 CPU with AVX-512 VBMI. Calif lists Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD EPYC and Ryzen Zen 4 or newer. Native ARM64 Java runtimes are not affected, because they never execute this x86 path.

Calif says it demonstrated remote code execution against several widely deployed Java applications in their default configurations. The lists are non-exhaustive:

  • Unauthenticated RCE: Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate.
  • Authenticated RCE: Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit and Spinnaker.

Calif also showed RCE in sample applications built on Apache Struts and Spring Boot, and described a client-side case in which a Java program that opens a TLS connection to a malicious server can be compromised even if it exposes no service of its own.

That does not mean every Java app is one request away from a shell. Calif and later write-ups are clear that there is no universal exploit. An attacker still has to find an application-specific way to feed malformed Base64 to the vulnerable decoder, then turn a constrained heap overwrite into code execution for that runtime and heap layout. Datadog’s assessment is the one to plan around: denial of service is the more realistic impact where the decoder is reachable; reliable RCE takes extra, targeted work.

What to do

# Runtime on the PATH (not always the one a service actually uses)
java -version

# Does this CPU support the vulnerable path? No output means it does not.
grep -om1 -E 'avx512[_]?vbmi' /proc/cpuinfo

# Confirm the flags of a running JVM, including a bundled runtime
jcmd <PID> VM.version
jcmd <PID> VM.flags -all
  1. Inventory every JDK and JRE, including runtimes bundled with third-party applications, appliances and container images. CISA notes that these often do not show up as a separate software entry. Check image tags such as eclipse-temurin, amazoncorretto, azul/zulu, ibm-semeru and graalvm.
  2. Upgrade to a fixed build — 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, or your vendor’s equivalent — then rebuild and redeploy any image that only inherited the runtime from a base layer. Restart every Java process so it actually loads the new binary.
  3. Prioritize internet-facing services and anything that decodes Base64 from unauthenticated input (tokens, basic auth, file uploads, protocol messages).
  4. If you cannot patch yet, start the JVM with -XX:-UseBASE64Intrinsics. That is the narrower workaround: it turns off the hardware-accelerated Base64 path only. The alternative, -XX:UseAVX=2, limits the JVM to AVX2 and should be applied only on x86-64. A native ARM64 JVM does not recognize that flag and will fail to start if it is in a shared options file. Confirm with jcmd that the running process shows UseBASE64Intrinsics = false or UseAVX = 2.
  5. Watch for unexplained JVM crashes, especially during garbage collection, and for unexpected Java processes. Those are the practical signals while you roll the patch.

Workarounds are temporary. The fix is a patched runtime, a rebuilt image, and a restart.

Sources & Primary Advisories

  1. Calif — Java4Shell: Write once, RCE everywhere
  2. Datadog Security Labs — Java4Shell: Remote Code Execution in OpenJDK (CVE-2026-114938)
  3. JFrog Security Research — Java4Shell (CVE-2026-114938)
  4. CISA — Critical Java Vulnerability Requires Immediate Patching
  5. OpenJDK Vulnerability Advisory: 2026/11/17
  6. Oracle — Critical Security Patch Update Advisory, November 2026
  7. BleepingComputer — Critical Java4Shell flaw allows RCE attacks on major Java applications
Share Dispatch