Java4Shell: Critical OpenJDK Vulnerability CVE-2026-114938 Triggers Urgent Patching
Java4Shell: Critical OpenJDK Vulnerability CVE-2026-114938 Triggers Urgent Patching
ava4Shell is the name given to CVE-2026-114938, a memory-corruption vulnerability in the OpenJDK HotSpot Java Virtual Machine’s optimised Base64 decoder. Under specific conditions, specially crafted Base64 input can crash the JVM or enable unauthenticated remote code execution.
It is a serious Java runtime vulnerability, but it is not another Log4Shell. Exploitation depends on the affected Java runtime, an x86-64 CPU with AVX-512 VBMI, a JIT-compiled Base64 decoder and a target-specific exploit chain.
Quick answer
Question | Short answer |
|---|---|
What is Java4Shell? | A memory-corruption flaw in OpenJDK HotSpot’s optimised Base64 decoder. |
CVE identifier | CVE-2026-114938. |
Does it affect JavaScript? | No. JavaScript and Node.js are separate technologies; this vulnerability affects Java runtimes. |
Is every Java server affected? | No. Exposure requires several conditions, including an |
What is the main fix? | Update to a fixed Java runtime, restart affected JVMs, and rebuild affected container images. |
Is it the same as Log4Shell? | No. Both can lead to remote code execution, but Java4Shell has much narrower exploitation conditions. |
What is Java4Shell?
Java4Shell is a heap-based out-of-bounds write in the HotSpot JVM’s AVX-512 VBMI Base64 decoding intrinsic—the optimised assembly path behind java.util.Base64.Decoder.
The issue is in the Java runtime itself, not in a third-party Java library. Java distributions built from affected OpenJDK code can therefore inherit the flaw.
CISA describes the issue as a critical memory-corruption vulnerability affecting the Base64 decoder of the x86-64 HotSpot JVM. Specially crafted Base64 input could crash the JVM and potentially allow unauthenticated remote code execution.
Java is not JavaScript
A common point of confusion is the word Java.
Java is a programming language and runtime environment executed by a JVM, such as OpenJDK, Oracle Java, Amazon Corretto, Eclipse Temurin or Azul Zulu.
JavaScript is a separate scripting language commonly used in browsers and Node.js.
Java4Shell affects Java runtimes, not JavaScript code or Node.js.
If your website runs JavaScript in the browser or Node.js on the server, Java4Shell does not automatically mean that JavaScript is vulnerable. You still need to assess whether the server or container also runs a Java application.
How the vulnerability works
On supported x86-64 CPUs with AVX-512 VBMI, HotSpot can replace the standard Base64 decoder with an optimised intrinsic once the method is JIT-compiled. This commonly happens in busy Java services.
A malformed Base64 string containing an unexpected trailing = character can cause the decoder to calculate the output length incorrectly. Java then rejects the input as invalid, but only after the out-of-bounds write has occurred.
The reported overflow writes 62–63 bytes beyond the end of the allocated output buffer. Researchers described a technique called JavaBleed, in which heap memory is shaped so the overflow expands a neighbouring array, enabling further memory reads and writes that can lead to code execution inside the JVM.
Is my Java system exposed?
A system is potentially exposed only when several conditions are met. A vulnerable Java version alone does not prove exploitation is possible.
Exposure conditions
Condition | Requirement |
|---|---|
Runtime | An affected HotSpot-based Java runtime. |
CPU | An x86-64 processor with AVX-512 VBMI support. |
JVM configuration | The JVM has not been started with |
Reachability | Untrusted Base64 input reaches the basic or URL decoder. |
JIT | The Base64 decoder has been JIT-compiled. |
Common input paths
Base64 decoding is common in web applications, identity systems and APIs. Potential paths include:
Authorization: Basic ...headersBearer JWTs
SAML artifacts
CSRF tokens
Base64-encoded file uploads
API request fields
TLS connections from Java clients to attacker-controlled servers
Affected Java versions
The vulnerability affects OpenJDK 17 from version 17.0.6, as well as Java 21, 25 and 27, up to the specified vulnerable builds.
Runtime or distribution | Affected versions |
|---|---|
Oracle Java SE | 8u511b33-perf, 17.0.21.0.3 and earlier, 21.0.13.0.3 and earlier, 25.0.5.0.3 and earlier, 27.0.1.0.3 and earlier. |
Oracle GraalVM | GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3; GraalVM Enterprise 21.3.20.0.3. |
OpenJDK distributions | Java 17.0.6 through 17.0.21; Java 21 before 21.0.13.1; Java 25 before 25.0.5.1; Java 27 before 27.0.1.1. |
End-of-life Java versions | Java 18–20, 22–24 and 26 are also affected. |
Examples of affected OpenJDK distributions include Oracle OpenJDK, Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine and Red Hat builds of OpenJDK.
Environments not affected
The following environments are reported as not affected by the vulnerability:
Standard Java 8 and Java 11.
ARM64 hosts, including AWS Graviton.
Older x86-64 CPUs without AVX-512 VBMI.
This is important for cloud teams: the same container image may be vulnerable on one node and unaffected on another, depending on the underlying CPU. Assess the hosts running the workloads, not only the container image How to check CPU support
On Linux, you can check whether a host exposes the relevant CPU instruction flags. All four flags must be present for the vulnerable CPU path to be possible.
bashgrep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | \grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
This command checks for:
avx512favx512bwavx512vbmibmi2
If these flags are absent, the reported vulnerable CPU path is not available on that host.
How to check the Java version
Check the Java version used by the actual running process, not only the package installed on disk.
bashjava -version
For a specific running JVM process, identify its command line and inspect the executable or runtime path:
bashps -ef | grep java
For containers, inspect the image and the running container:
bashdocker exec -it <container> java -version
For Kubernetes, identify pods running Java workloads and check their images, then verify the runtime inside a running pod where appropriate:
bashkubectl get pods -o widekubectl exec -it <pod> -- java -version
Updating an installed package does not protect a JVM process that has not been restarted.
Available fixes
The primary remediation is to update the Java runtime to a fixed build, then restart the JVM and rebuild or redeploy affected container images.
Distribution | Fixed release |
|---|---|
Oracle Java SE 8 Performance Pack | 8u513-perf. |
Oracle Java SE 17 | 17.0.21.1. |
Oracle Java SE 21 | 21.0.13.1. |
Oracle Java SE 25 | 25.0.5.1. |
Oracle Java SE 27 | 27.0.1.1. |
Oracle GraalVM | GraalVM for JDK 17.0.21.1 and 21.0.13.1; Enterprise 21.3.20.1. |
Amazon Corretto | 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4. |
Azul Zulu free builds | 17.70.201, 21.54.201, 25.38.201, 27.30.201. |
SAP SapMachine | 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1. |
Patch availability changes quickly. Check your Java vendor’s current advisory before deploying, especially for Eclipse Temurin, Microsoft Build of OpenJDK, BellSoft Liberica and Red Hat builds, which were reported as pending at the time of the source advisory.
Applications that may bundle Java
A patched system Java installation does not necessarily protect an application that bundles its own JDK.Examples of products that may bundle Java runtimes include:
Jenkins
Elasticsearch
Jira
Confluence
Keycloak
For these products, apply the update supplied by the product vendor. Do not assume that upgrading the operating system’s Java package fixes an embedded runtime.
Temporary mitigations
If immediate patching is not possible, CISA recommends temporary compensating controls such as validating and restricting Base64 input at the application boundary, enforcing input-size limits and limiting unauthenticated access.
Palo Alto Networks also documents two JVM-level workarounds:
JVM flag | Effect | Consideration |
|---|---|---|
| Disables the optimised Base64 code path, removing the vulnerable execution path. | Workloads performing extensive Base64 decoding may see reduced performance. |
| Disables AVX-512 entirely. | Applies only to x86-64; the JVM does not recognise the flag on ARM64 and will not start. |
Important: Do not use -XX:DisableIntrinsic=_base64_decodeBlock on its own. Reports indicate that this flag can prevent the JVM from starting.
Treat workarounds as temporary risk reduction, not a replacement for patching.
Remediation checklist
Inventory Java runtimes. Include system Java, application-bundled JDKs, containers, appliances and third-party software.
Identify affected versions. Prioritise internet-facing systems and critical internal services.
Check CPU capability. Confirm whether hosts support AVX-512 VBMI.
Apply vendor patches. Use the fixed release from Oracle, OpenJDK or your Java distribution vendor.
Update bundled products. Patch products such as Keycloak, Jenkins, Jira, Confluence and Elasticsearch through their own vendor updates.
Restart JVMs. A package update alone does not protect a running process.
Rebuild container images. Redeploy updated images rather than relying on an old base layer.
Verify the running version. Confirm the fixed build is actually in use.
Monitor for suspicious activity. Watch for unexpected JVM crashes, rogue runtimes and suspicious Java processes.
Prioritisation guidance
CISA advises prioritising internet-facing systems for patching.
A practical prioritisation order is:
Internet-facing identity providers, such as Keycloak or other authentication services.
Critical infrastructure and high-value internal systems.
Other internet-facing Java services handling authentication, tokens or uploads.
Java clients connecting to untrusted external TLS endpoints.
Internal Java services.
Remaining affected environments.
Java4Shell vs Log4Shell
Java4Shell and Log4Shell both involve Java ecosystems and can potentially lead to remote code execution, but they are very different vulnerabilities.
Feature | Log4Shell (CVE-2021-44228) | Java4Shell (CVE-2026-114938) |
|---|---|---|
Location | Log4j 2 logging library | HotSpot JVM Base64 intrinsic. |
Hardware dependency | None | x86-64 with AVX-512 VBMI; ARM64 is not affected. |
Payload | A short JNDI string that can work wherever it is logged | Malformed Base64 plus a target-specific memory layout and timing chain. |
Universal exploit | Yes | No; each product, build and memory layout may require its own exploit chain. |
Exploit reliability | Deterministic | Timing- and network-sensitive; failed attempts may crash the JVM. |
Scope | Very broad | Narrower, but still high priority for affected systems. |
Calling Java4Shell “the next Log4Shell” is inaccurate. The appropriate response is urgent, targeted patching—not panic-driven assumptions that every Java deployment is compromised.
Detection guidance
CISA advises monitoring for indicators of suspicious activity, including rogue runtimes, unexpected JVM crashes and suspicious Java processes.
Potential indicators include:
Base64 tokens of 32 characters or more ending in
=, with a length that is not a multiple of four, particularly inAuthorizationheaders.Bursts of
IllegalArgumentExceptionerrors fromjava.util.Base64$Decoder.Unexplained
hs_err_pid*.logJVM crash files.Repeated service restarts.
These signals may indicate exploitation attempts, but they do not independently prove compromise. Their absence also does not establish that a host is safe.
Frequently asked questions
What is Java4Shell?
Java4Shell is the public name for CVE-2026-114938, a memory-corruption vulnerability in the OpenJDK HotSpot JVM’s optimised Base64 decoder. It can potentially lead to unauthenticated remote code execution under specific conditions.
Does Java4Shell affect JavaScript?
No. Java4Shell affects Java runtimes, not JavaScript or Node.js. However, a server may run both Java and JavaScript technologies, so assess the complete workload rather than assuming one technology is safe.
Is Java4Shell the same as Log4Shell?
No. Log4Shell was a vulnerability in the Log4j 2 logging library. Java4Shell is a vulnerability in the HotSpot JVM’s Base64 decoder and has much narrower exploitation requirements.
Which Java versions are affected?
Affected versions include Java 17.0.6 through 17.0.21, Java 21 before 21.0.13.1, Java 25 before 25.0.5.1, Java 27 before 27.0.1.1, and Oracle Java SE 8u511b33-perf. End-of-life Java versions 18–20, 22–24 and 26 are also affected.
Does Java4Shell affect ARM servers?
No. ARM64 hosts, including AWS Graviton, are reported as not affected because the vulnerable path requires x86-64 AVX-512 VBMI support.
Can a reverse proxy protect me?
A reverse proxy that buffers complete requests, such as NGINX in its default configuration, may block some exploit chains. It does not provide comprehensive protection and should not replace patching.
What should I do first?
Inventory Java runtimes, identify internet-facing Java services, apply available vendor patches, restart JVMs, rebuild affected container images and verify the running version.

Feedback & Discussion
Have questions or insights? Share your thoughts below.