Table of contents

CVE-2026-114938 (Java4Shell): Heap overflow in OpenJDK’s Base64 decoder

Java4Shell

On November 17, 2026, OpenJDK and Oracle released fixes for CVE-2026-114938, a memory corruption flaw in the HotSpot JVM that its reporters named Java4Shell. The bug sits in the hand-written x86-64 routine the JVM uses to speed up Base64 decoding, and it affects Java 17 (from 17.0.6), 21, 25, and 27. A malformed Base64 string can make the decoder write past the end of a heap buffer, which can crash the JVM and, in some cases, lead to unauthenticated remote code execution. Oracle scores it CVSS 3.1 8.1 (High), with high attack complexity and no authentication required.

The bug

java.util.Base64 decodes in plain Java, but HotSpot’s C2 compiler replaces the hot path with an intrinsic: a hand-tuned assembly stub that uses AVX-512 instructions on CPUs that support AVX-512 VBMI. Java 17 builds before 17.0.6 are not affected.

The flaw is in how the stub handles the last few characters of the input. When the final group carries = padding, the stub miscalculates the store mask for the padded tail, and its masked store writes past the end of the destination array on the Java heap. In Calif’s reproducer, 62 bytes beyond the end of the buffer are overwritten. Java rejects the malformed input with an IllegalArgumentException, but only after the write has happened.

The intrinsic is used only after C2 compiles the decoding method, so a single request to a freshly started JVM doesn’t reach it. Sending enough valid Base64 first makes the method hot and brings the intrinsic into play.

The basic and URL decoders use the vulnerable intrinsic, while the MIME decoder takes a different path.

Who’s affected

Triggering the bug needs three things at once: an affected Java build, a CPU that exposes the right instruction set, and attacker-controlled Base64 reaching the decoder.

ProductAffected builds
Java 1717.0.6 to 17.0.21.0.3
Java 21up to 21.0.13.0.3
Java 25up to 25.0.5.0.3
Java 27up to 27.0.1.0.3
Oracle Java SE 8 Performance Pack8u511b33-perf
Oracle GraalVM for JDK17.0.21.0.3, 21.0.13.0.3
Oracle GraalVM Enterprise Edition21.3.20.0.3

The flaw also affects vulnerable builds of OpenJDK-based distributions, including Temurin, Corretto, Zulu, Red Hat, Microsoft Build of OpenJDK, Liberica, and SapMachine. Each vendor provides its own fixed builds. The same applies to Java runtimes bundled inside products and container images.

On the hardware side, the CPU must expose avx512f, avx512bw, avx512vbmi, and bmi2. This includes Intel Ice Lake and later and AMD Zen 4 and later. ARM64 hosts never run the vulnerable stub, and neither do x86-64 CPUs without AVX-512 VBMI.

Not affected: OpenJDK 8 and 11, Java 17.0.0 to 17.0.5, ARM64 systems, and CPUs without AVX-512 VBMI.

The vulnerable optimization is on by default wherever the CPU supports it. Reaching it takes no special configuration, only an application that feeds untrusted Base64 to the standard decoder. Typical input paths include HTTP Basic authentication headers, JWTs, SAML messages, cookies, and data received over TLS.

From memory corruption to code execution

On its own, the out-of-bounds write corrupts whatever object sits next to the output buffer, and the usual result is a JVM crash. That gives an unauthenticated attacker a denial of service against an exposed service on affected hardware.

Turning the write into more than a crash takes application-specific work. Researchers at Calif, who reported the flaw, describe how heap manipulation can direct the corruption toward a useful neighboring object, enabling adjacent memory disclosure and ultimately code execution. They report pre-authentication RCE in default installations of Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate, and post-authentication RCE in Kafka, Solr, Elasticsearch, Gerrit, and Spinnaker. Their findings also include a scenario in which a Java program opening a TLS connection to a malicious server can be compromised.

A reproducer that triggers the memory corruption has been published, while the product-specific exploit chains remain undisclosed.

As of November 18, 2026, no exploitation in the wild has been confirmed.

Timeline

DateEvent
October 22, 2026Oracle reserves CVE-2026-114938
November 17, 2026OpenJDK and Oracle publish advisories and fixed builds; Calif publishes its write-up; CISA issues an alert; Amazon releases fixed Corretto builds; Red Hat publishes RHSB-2026-018
November 18, 2026CERT-EU publishes advisory 2026-021; Eclipse Temurin announces its fixed builds

Fixed versions

The table reflects vendor releases as of November 18, 2026. The fixed builds listed below use vendor-specific version numbers. For Oracle Java SE, the fixed releases carry the .1 update suffix, and a runtime that reports 17.0.21, 17.0.21.0.3, or 21.0.13 is still vulnerable.

VendorJava 17Java 21Java 25Java 27
Oracle Java SE17.0.21.121.0.13.125.0.5.127.0.1.1
Eclipse Temurin17.0.21.1+221.0.13.1+225.0.5.1+227.0.1.1+4
Amazon Corretto17.0.21.1.221.0.13.1.225.0.5.1.227.0.1.1.4

The Oracle Java SE 8 Performance Pack is fixed in 8u513. Patch availability varies by distribution. For Red Hat, Microsoft Build of OpenJDK, Ubuntu, SUSE, Debian, and other vendors, consult the relevant security advisory for confirmed fixed builds.

Detection

A Linux host is exposed only if its CPU flags in /proc/cpuinfo include all four of avx512f, avx512bw, avx512vbmi, and bmi2. Hosts without avx512vbmi don’t need the workaround. For the runtime, check the JDK each service actually starts with, including JDKs bundled with third-party products and container images.

For signs of attempts, look for:

  • unexpected JVM crashes on affected hosts, including new hs_err_pid*.log files and restart loops
  • IllegalArgumentException raised from java.util.Base64 decoding in application logs
  • malformed Base64 input, particularly in authentication headers, correlated with decoder exceptions or JVM crashes

None of these proves compromise, and their absence doesn’t prove a service is safe.

Remediation

  • Inventory every Java runtime, including those bundled with third-party applications, appliances, and container images.
  • Update to a fixed build from your vendor, starting with internet-facing x86-64 services on AVX-512 VBMI hardware.
  • Restart every JVM and rebuild container images. A patched JDK on disk doesn’t protect a process that is still running the old one.
  • If you can’t patch yet, disable the vulnerable optimization. Start the JVM with -XX:+UnlockDiagnosticVMOptions -XX:-UseBASE64Intrinsics. This switches off only the accelerated Base64 path. The alternative, -XX:UseAVX=2, turns off AVX-512 entirely and can reduce performance. Use it only on x86-64, because an ARM64 JVM refuses to start with it. Both options need a restart.
  • Don’t rely solely on a reverse proxy or WAF. Network-level mitigations may reduce exposure but do not replace patching the vulnerable Java runtime.
  • Restrict exposure where you can. Limit unauthenticated access to services that decode Base64 input until they are patched.

References

Manage open source risk

Read the report

Recent resources

Agent Framework Compromised

Microsoft agent-framework on PyPI: .pth hook steals Azure and CI credentials

agent-framework 1.26.1 and 1.26.2 steal credentials via a .pth startup hook.

Read more
PHP2Shell in CISA KEV

PHP2Shell is in CISA KEV: why runtime visibility matters

PHP2Shell is in CISA KEV. Who is still exposed, and how to find every build.

Read more
PHP2Shell 2

PHP2Shell: the fix is a runtime upgrade, not a code change

Two critical PHP RCE flaws: who is exposed and how to find every runtime.

Read more