Java4Shell: OpenJDK Base64 Heap Overflow Risks Remote Code Execution

Red | Vulnerability
Java4Shell: OpenJDK Base64 Heap Overflow Risks Remote Code Execution | Hive Pro Threat Advisory
Date of Publication
November 18, 2026
Admiralty Code
A1
TA Number
TA2026343
First Seen
November 17, 2026
CVE
CVE-2026-114938
CWE
CWE-122
CVSS
8.1 (High)
Patch
Available (released November 17, 2026)
Affected Products
OpenJDK, Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise Edition, Oracle JavaFX, Oracle OpenJDK, Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK
01 / Overview

Summary

Java4Shell (CVE-2026-114938) is a high-severity (CVSS 8.1) heap overflow in the HotSpot JVM's AVX-512 Base64 decoder. It affects OpenJDK 17.0.6 and later and downstream builds including Oracle Java SE, GraalVM, Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine and Red Hat OpenJDK on Intel Xeon and AMD Zen 4+ servers.

Unauthenticated attackers can reach the OpenJDK flaw through routine Base64 handling in logins, tokens and file uploads to leak secrets such as private keys or execute code. Researchers report pre-auth compromise of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate. Fixes were released on November 17, 2026. No in-the-wild exploitation has been reported, but public Java4Shell exploit code is already circulating on GitHub.


02 / Analysis

Vulnerability Details

#1

Java4Shell is a heap memory corruption flaw in HotSpot's x86-64 Base64 decoding stub, a hand-written AVX-512 routine that the JIT compiler swaps in for java.util.Base64 decoding once the method is frequently used. When the decoder reaches a final chunk made up only of "=" padding, its output-length calculation underflows to a negative value, and the resulting write mask allows a full 64-byte store instead of a few bytes.

#2

A simple input of 64 "A" characters followed by "=" (128 on JDK 17) is enough to trigger it, writing 62 bytes past the end of the output buffer. The decoder still rejects the input with an IllegalArgumentException, but only after neighboring heap objects have already been overwritten, so catching the exception offers no protection.

#3

The flaw is reachable remotely and often without authentication through any feature that decodes attacker-supplied Base64, such as Basic Auth headers, tokens, and file uploads, and a Java client connecting to a malicious TLS server is also exposed. Exploitation requires the decoder to be JIT-compiled first, typically by flooding the target with valid requests, and only affects x86-64 CPUs with AVX-512 VBMI support, leaving ARM64 systems unaffected.

#4

The overwrite is largely fixed-value, but researchers report that through heap grooming it can corrupt adjacent array lengths and be chained into Heartbleed-style memory disclosure and ultimately remote code execution. Exploitation is application-specific and sensitive to network conditions, and failed attempts can crash the JVM.

#5

The fix, JDK-8393212, adds a small guard that routes short padded tails to the safe scalar decoder. The discoverers are withholding their product-specific exploit chains, but a public GitHub repository already offers a trigger, staged exploit primitives, and attack modules for Keycloak, Jenkins, Spring Boot, and Elasticsearch, which so far confirm the overflow but not reliable code execution.

Vulnerabilities
CVE IDNameAffected ProductsCWE IDAffected CPE
CVE-2026-114938(Java4Shell) OpenJDK HotSpot x86-64 Base64 Intrinsic Out-of-Bounds Write VulnerabilityOpenJDK 17 (17.0.6 - Before 17.0.21.1), OpenJDK 21 (Before 21.0.13.1), OpenJDK 25 (Before 25.0.5.1), OpenJDK 27 (Before 27.0.1.1); Oracle Java SE (8u511b33, 8u511b33-perf, 11.0.33.0.3, 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); Oracle JavaFX (21.0.13, 25.0.5, 27.0.1); Oracle OpenJDK; Amazon Corretto; Eclipse Temurin; Microsoft Build of OpenJDK; Azul Zulu; BellSoft Liberica; SAP SapMachine; Red Hat OpenJDK (x86-64 with AVX-512 VBMI only)CWE-122cpe:2.3:a:oracle:openjdk:*:*:*:*:*:*:*:*cpe:2.3:a:oracle:java_se:*:*:*:*:*:*:*:*cpe:2.3:a:oracle:java_se:*:*:*:*:enterprise_performance:*:*:*cpe:2.3:a:oracle:graalvm_for_jdk:*:*:*:*:*:*:*:*cpe:2.3:a:oracle:graalvm:*:*:*:*:enterprise:*:*:*cpe:2.3:a:oracle:javafx:*:*:*:*:*:*:*:*cpe:2.3:a:amazon:corretto:*:*:*:*:*:*:*:*cpe:2.3:a:eclipse:temurin:*:*:*:*:*:*:*:*cpe:2.3:a:microsoft:build_of_openjdk:*:*:*:*:*:*:*:*cpe:2.3:a:azul:zulu:*:*:*:*:*:*:*:*cpe:2.3:a:bellsoft:liberica_jdk:*:*:*:*:*:*:*:*cpe:2.3:a:sap:sapmachine:*:*:*:*:*:*:*:*cpe:2.3:a:redhat:openjdk:*:*:*:*:*:*:*:*

03 / Response

Recommendations

01
Identify Exposed Hosts by CPU Capability
Exposure requires an x86-64 processor that supports avx512f, avx512bw, avx512vbmi, and bmi2. On Linux, run grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$' and treat hosts that return all four flags as in scope. Cloud instance types can change underlying CPU generations, so use this check to prioritize rather than to defer patching.
02
Restrict Network Exposure of Java Services
Limit access to affected services to trusted networks, place administrative and authentication endpoints behind VPN or zero-trust access, and restrict outbound TLS from Java applications to approved destinations, since connecting to a malicious server can also compromise a Java client.
03
Monitor for Trigger Patterns and JVM Instability
Review web, WAF, and application logs for Base64-bearing fields containing long runs of "A" followed by "=" (64 characters for JDK 21 and later, 128 for JDK 17) or malformed padding in Authorization: Basic headers, and alert on high-volume Basic Auth bursts from a single source, which mark the JIT warm-up phase. On hosts, investigate bursts of IllegalArgumentException from the Base64 decoder and hs_err_pid crash logs showing SIGSEGV in G1 GC or StubRoutines frames. Treat matches as leads rather than conclusive detections.
04
Apply the November 2026 Java Security Updates Immediately
Install the fixes released on November 17, 2026 through Oracle's November 2026 Critical Security Patch Update (Java SE patch document CPU435) and the OpenJDK Vulnerability Group advisory, moving to 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or later (8u513-perf for the Java SE 8 Performance Pack), and prioritize internet-facing systems and hosts running identity, CI/CD, artifact, and collaboration platforms. Restart every JVM process after upgrading, since running JVMs keep the vulnerable code in memory.
05
Disable the Vulnerable Intrinsic Where Patching Is Delayed
As a temporary workaround reported by Calif and independent researchers, and not published by Oracle or OpenJDK, start affected JVMs with -XX:-UseBASE64Intrinsics to disable the hardware-accelerated Base64 path, or apply it fleet-wide through JAVA_TOOL_OPTIONS or product-specific variables such as ES_JAVA_OPTS, JAVA_OPTS_APPEND for Keycloak, and JAVA_OPTS for Jenkins, then restart the affected processes. Alternatively, -XX:UseAVX=2 disables AVX-512 entirely, but apply it only on x86-64 hosts because OpenJDK on ARM does not recognize the flag and will fail to start. Remove the flag once the patched JDK is deployed.
06
Update Downstream JDK Distributions and Bundled Runtimes
Many applications ship with an embedded JRE or run on vendor builds such as Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, or Red Hat OpenJDK. Track each distribution's corresponding release, rebuild container images that pin a JDK base layer, and confirm with product vendors when updated bundles are available. Products such as Elasticsearch ship a bundled JDK that cannot be patched independently, so apply the interim workaround through their own JVM option variables until the vendor releases an update.
07
Rotate Secrets on High-Risk Systems
Because the flaw enables heap memory disclosure, rotate private keys, signing keys, API tokens, and service credentials held in memory by exposed internet-facing Java applications after patching, particularly on identity providers and CI/CD servers where leaked material grants broad downstream access.

04 / Adversary Behavior

MITRE ATT&CK TTPs

Reconnaissance
T1595
Active Scanning
T1595.002
Vulnerability Scanning
Resource Development
T1588
Obtain Capabilities
T1588.005
Exploits
Initial Access
T1190
Exploit Public-Facing Application
Execution
T1203
Exploitation for Client Execution
Credential Access
T1212
Exploitation for Credential Access
Impact
T1499
Endpoint Denial of Service
T1499.004
Application or System Exploitation

05 / Questions

Frequently Asked Questions

What is Java4Shell (CVE-2026-114938)?

Java4Shell is a high-severity (CVSS 8.1) heap overflow (CWE-122) in the HotSpot JVM's AVX-512 Base64 decoder. When the decoder processes a final chunk made only of "=" padding, its output-length calculation underflows and a full 64-byte store writes past the end of the output buffer.

Which Java products and versions are affected by Java4Shell?

OpenJDK 17.0.6 and later and downstream builds are affected, including OpenJDK 17, 21, 25 and 27 before the fixed releases, Oracle Java SE, Oracle GraalVM for JDK, GraalVM Enterprise Edition, Oracle JavaFX, Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine and Red Hat OpenJDK.

Which systems are actually exposed to CVE-2026-114938?

Only x86-64 servers whose CPUs support AVX-512 VBMI, such as Intel Xeon and AMD Zen 4+, are exposed. The CPU flag check requires avx512f, avx512bw, avx512vbmi and bmi2. ARM64 systems are unaffected.

Can Java4Shell be exploited remotely without authentication?

Yes. Any feature that decodes attacker-supplied Base64, such as Basic Auth headers, tokens and file uploads, can reach the flaw, often without authentication. A Java client connecting to a malicious TLS server is also exposed. The decoder must first be JIT-compiled, typically by flooding the target with valid requests.

What can an attacker achieve with Java4Shell?

Researchers report that heap grooming can corrupt adjacent array lengths and be chained into Heartbleed-style memory disclosure, leaking secrets such as private keys, and ultimately remote code execution. Exploitation is application-specific and failed attempts can crash the JVM.

Is Java4Shell being exploited in the wild?

No in-the-wild exploitation has been reported. However, a public GitHub repository already offers a trigger, staged exploit primitives and attack modules for Keycloak, Jenkins, Spring Boot and Elasticsearch, which so far confirm the overflow but not reliable code execution.

Which applications have researchers reported as compromised?

Researchers report pre-auth compromise of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate.

Is a patch available for CVE-2026-114938?

Yes. Fixes were released on November 17, 2026 via Oracle's November 2026 Critical Security Patch Update (CPU435) and the OpenJDK Vulnerability Group advisory. Upgrade to 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or later (8u513-perf for the Java SE 8 Performance Pack) and restart every JVM process. The fix, JDK-8393212, routes short padded tails to the safe scalar decoder.

Is there a workaround if patching is delayed?

Researchers report starting affected JVMs with -XX:-UseBASE64Intrinsics to disable the hardware-accelerated Base64 path, or -XX:UseAVX=2 to disable AVX-512 on x86-64 hosts only. These workarounds are not published by Oracle or OpenJDK and should be removed after patching.

How can I detect Java4Shell exploitation attempts?

Look for Base64 fields with long runs of "A" followed by "=" (64 characters for JDK 21 and later, 128 for JDK 17), bursts of IllegalArgumentException from the Base64 decoder, and hs_err_pid crash logs showing SIGSEGV in G1 GC or StubRoutines. The advisory's experimental Sigma rules cover these indicators; test them before deployment, as unrelated JVM crashes can also trigger them.

Does catching the IllegalArgumentException protect an application?

No. The decoder rejects the input with the exception only after neighboring heap objects have already been overwritten.

Should secrets be rotated after patching?

Yes, on high-risk systems. Because the flaw enables heap memory disclosure, rotate private keys, signing keys, API tokens and service credentials held in memory by exposed internet-facing Java applications, particularly identity providers and CI/CD servers.


06 / Sources

References & Patch Links

Patch Link
References

What Next?

At Hive Pro, it is our mission to detect the most likely threats to your organization and to help you prevent them from happening.

Reduce real exposure. Not just vulnerability volume.