NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Home/Blog/Java4Shell (CVE-2026-114938): How to Check If You're Exposed and Fix It
Threat ResearchNovember 17, 202611 min read

Java4Shell (CVE-2026-114938): How to Check If You're Exposed and Fix It

Java4Shell needs an affected JDK, an AVX-512 VBMI CPU and attacker Base64 to line up. How to check each one, patch, mitigate and hunt for attempts.

R
Security researcher with multiple CVE credits, including CVE-2024-9145 in Wiz's VS Code extension. 3x Black Hat Arsenal presenter. Former Meta security engineer.
Java4Shell (CVE-2026-114938): How to Check If You're Exposed and Fix It
Key takeaways
  • Java4Shell (CVE-2026-114938) is a heap overflow in HotSpot's AVX-512 Base64 decoder, scored 8.1 (CVSS 3.1) by Oracle and 9.2 (CVSS 4.0) by Calif, the firm that found it.
  • Fixed OpenJDK builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Oracle's own November builds ending in .0.3 are still affected.
  • The bug only exists on x86-64 CPUs with AVX-512 VBMI: Intel Ice Lake and newer, AMD Zen 4 and newer. ARM64, Graviton, Skylake-SP and Cascade Lake are not affected.
  • UseBASE64Intrinsics=true does not prove exposure. HotSpot turns it on for Cascade Lake too, but the vulnerable code path also requires avx512vbmi.
  • The URL-safe decoder takes the same vulnerable path, so JWT parsing counts. Patch the runtime instead of trying to prove no input reaches the decoder.

Checking the Java version is not enough for Java4Shell. The same JDK build can be vulnerable on one server and safe on another, because the vulnerable code is only generated on certain Intel and AMD CPUs.

Java4Shell (CVE-2026-114938) is a heap buffer overflow in the x86-64 AVX-512 fast path that OpenJDK's HotSpot JVM uses to decode java.util.Base64 input. A crafted Base64 string with a padded tail makes the JIT-compiled stub write 62 or 63 bytes past the end of a heap array. Calif disclosed it on November 17, 2026, at the same time Oracle and OpenJDK shipped fixes.

By the numbers

Two scores are in circulation. The OpenJDK advisory and Oracle's November Critical Security Patch Update rate it 8.1 under CVSS 3.1 (network, high complexity, no privileges, no user interaction, high impact on confidentiality, integrity and availability). Calif rates it 9.2 under CVSS 4.0. Endor Labs notes the vector string for that score has not been published.

This guide covers the three conditions that decide whether a system is exposed, a command to check each one, and what to do if you can't patch right away. Version numbers come from the OpenJDK advisory, Oracle's risk matrix and the OpenJDK source code.

The three conditions for exposure

A JVM is exposed only when all three of these are true:

  1. The JDK build. OpenJDK 17.0.6 or later, or any 21, 25 or 27 release, older than the November 17 fix. Standard Java 8 and 11 builds don't contain the vulnerable stub.
  2. The CPU. x86-64 with both AVX-512 VBMI and AVX-512 BW. That means Intel Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, or AMD Zen 4 and newer.
  3. The input. Attacker-influenced Base64 has to reach the basic or URL-safe java.util.Base64 decoder, in code the C2 JIT has already compiled. Calif's proof of concept warms the decoder with 200,000 valid decodes first.

The first two are quick to check and give a clear yes or no. The third is much harder to rule out, and we don't recommend relying on it. The section on input explains why.

1. Is your JDK build affected?

The OpenJDK advisory lists the affected versions as 27.0.1.0.3, 25.0.5.0.3, 21.0.13.0.3, 17.0.21.0.3 "and earlier". Those .0.3 builds are the November Critical Patch Update releases themselves, so being on last month's patch level doesn't help. The fix ships in the next build on each line.

Release lineAffectedFirst fixed OpenJDK buildNotes
Java 1717.0.6 up to 17.0.21.0.317.0.21.117.0.0 to 17.0.5 have no x86 decode stub (Endor Labs). Shortest trigger is 129 characters.
Java 21Up to 21.0.13.0.321.0.13.1Shortest trigger is 65 characters.
Java 25Up to 25.0.5.0.325.0.5.1Shortest trigger is 65 characters.
Java 27Up to 27.0.1.0.327.0.1.1Shortest trigger is 65 characters.
Java 11Not affectedNot applicable11.0.33.0.3 appears in the same advisory for other CVEs, not this one.
Java 8Standard builds not affectedNot applicableOracle lists its 8u511b33-perf performance build as affected.
Oracle GraalVMGraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3; GraalVM Enterprise 21.3.20.0.3See Oracle's advisoryListed in Oracle's Java SE risk matrix for CVE-2026-114938.
Java4Shell affected and fixed builds by release line
Note

We checked the public OpenJDK update repositories on November 18, 2026. The fix commit, JDK-8393212, is titled simply "Base64 optimization improvements". It is present in the jdk-17.0.21.1-ga, jdk-21.0.13.1-ga, jdk-25.0.5.1-ga and jdk-27.0.1.1-ga tags. Endor Labs reported on November 17 that the 17, 21 and 25 fixes were not yet public. They are now.

The fix itself is four lines in src/hotspot/cpu/x86/stubGenerator_x86_64.cpp. It sends any padded tail shorter than one 4-character Base64 unit back to the scalar decoder, which is exactly the case where the AVX-512 path miscomputes its store mask:

JDK-8393212 (as committed to openjdk/jdk)
     __ BIND(L_finalBit);
     // Now have 1 to 63 bytes left to decode
 
+    // A padded Base64 tail shorter than one complete block is handled by Java.
+    __ cmpl(length, 4);
+    __ jcc(Assembler::less, L_bruteForce);
+
     // I was going to let Java take care of the final fragment

Downstream builds such as Eclipse Temurin, Amazon Corretto, Azul Zulu, Microsoft Build of OpenJDK, Red Hat OpenJDK, SAP SapMachine and BellSoft Liberica release on their own schedules. Calif lists all of them as built from affected OpenJDK code. A version number doesn't mean the same thing across vendors, so look for CVE-2026-114938 in your vendor's release notes rather than assuming.

find-jvms.sh
# Every running JVM on this host: binary path and exact version.
# Run jcmd as the same user that owns the JVM process.
for pid in $(pgrep -x java); do
  echo "== PID $pid  $(readlink -f /proc/$pid/exe)"
  sudo -u "$(ps -o user= -p "$pid")" jcmd "$pid" VM.version
done

# Kubernetes: list every image, then check the JDK inside the ones that run Java.
# The JDK lives in the image, not in your pom.xml.
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{" "}{end}{"\n"}{end}'
kubectl exec -n <namespace> <pod> -- java -version

2. Does your CPU support AVX-512 VBMI?

HotSpot only generates the vulnerable AVX-512 decode loop when the CPU reports both AVX-512 VBMI and AVX-512 BW. We read generate_base64_decodeBlock() in the jdk-17.0.21.0.3 source to confirm this. Without both features, HotSpot uses the non-AVX decode loop instead, which doesn't have the bug.

check-cpu.sh
# All four flags must print for the vulnerable path to exist.
# Works on the host or inside any container on it: containers see the host's CPU flags.
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

# Kubernetes clusters running Node Feature Discovery expose the flag as a node label
kubectl get nodes -L feature.node.kubernetes.io/cpu-cpuid.AVX512VBMI
Watch out

Don't use the UseBASE64Intrinsics flag as your CPU test. In JDK 17, HotSpot's vm_version_x86.cpp turns it on whenever UseAVX is above 2 and the CPU has AVX-512 VL and BW. Skylake-SP and Cascade Lake Xeons meet that bar but have no VBMI, so the flag reads true while the vulnerable loop is never generated. A scan that keys on the flag alone will over-report on older Xeon fleets.

Instance familyProcessorAVX-512 VBMIVulnerable path generated?
AWS M5Intel Skylake / Cascade LakeNoNo
AWS M6iIntel Ice Lake (3rd Gen Xeon Scalable)YesYes
AWS M7i4th Gen Intel Xeon Scalable (Sapphire Rapids)YesYes
AWS M6aAMD EPYC Milan (Zen 3)No AVX-512No
AWS M7a4th Gen AMD EPYC Genoa (Zen 4)YesYes
AWS GravitonARM64Not applicableNo
GCP N2Cascade Lake or Ice LakeDepends on the hostDepends on the host
GCP C3Intel Sapphire RapidsYesYes
GCP C3DAMD EPYC GenoaYesYes
Common cloud instance families and the Java4Shell CPU precondition

GCP N2 needs extra care. Google's documentation says N2 defaults to Cascade Lake for machine types up to 80 vCPUs, and uses Ice Lake for larger types or when Ice Lake is set as the minimum CPU platform. Two N2 VMs in the same project can be on different CPUs. The same applies to autoscaled pools that mix instance types. Check each node, not just the instance family.

3. Can untrusted Base64 reach the decoder?

A JVM that never decodes attacker-controlled Base64 can't be exploited. Proving that is difficult, for four reasons:

  • The URL-safe decoder is in scope. JFrog's write-up left this as an open question. The HotSpot source answers it: Base64.getUrlDecoder() loads a different lookup table, then jumps into the same AVX-512 loop and the same padding logic. Only the MIME decoder is routed away to the scalar path.
  • JWTs use base64url and are decoded before authentication. auth0's java-jwt library, for example, calls Base64.getUrlDecoder().decode() on the token header and payload inside JWTDecoder, before any signature check runs.
  • Frameworks decode on your behalf. HTTP Basic credentials, SAML assertions and many cookies are Base64 on the wire. Whether your stack decodes them with java.util.Base64 or its own codec is something you'd have to check library by library.
  • Clients are affected too. Calif describes a client-side exploit in which a Java program that opens a TLS connection to a malicious server can be compromised.

Reachability analysis works well when the vulnerable function is in a library you can upgrade separately and the call graph is your own code. Here the bug is in the JVM, the call graph would need to cover the JDK and every framework on the classpath, and the fix is a JDK upgrade. Use reachability to decide which services to patch first, not whether to patch.

Remediation, in order

  1. Upgrade the JDK to 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, or your vendor's build that lists CVE-2026-114938 as fixed. Then restart every JVM. The bug is in JIT-generated code, so an upgraded JDK on disk does nothing for a process that started before it.
  2. Rebuild container images. If a Dockerfile starts FROM eclipse-temurin:21-jre, the fix only arrives after that tag is rebuilt upstream and you rebuild and redeploy on top of it. Images pinned by digest stay vulnerable until you bump the digest.
  3. Patch in this order: hosts with AVX-512 VBMI CPUs first, then internet-facing services, then anything that decodes tokens or other Base64 from unauthenticated callers. Calif names Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate as pre-auth RCE targets in default configurations.
  4. If you can't upgrade this week, apply one of the JVM flags below, confirm it took effect in the running process, and put a removal date on it.
  5. Once patched, remove the flag. Even the narrowest option gives up the Base64 intrinsic speed-up, and -XX:UseAVX=2 disables all AVX-512 code generation.

Mitigation flags if you can't patch yet

Endor Labs lists three options, from narrowest to broadest. Calif and JFrog give the second and third. Each one stops the JVM from using the vulnerable stub.

java4shell-mitigation.sh
# 1. Narrowest: disable only the Base64 decode intrinsic
export JAVA_TOOL_OPTIONS="-XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_decodeBlock"

# 2. Disable both the Base64 encode and decode intrinsics
export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"

# 3. Broadest: disable all AVX-512 code generation (x86-64 hosts ONLY)
export JAVA_TOOL_OPTIONS="-XX:UseAVX=2"

# Confirm the flag is live in the same JDK and environment your service uses
java -XX:+PrintFlagsFinal -version 2>/dev/null | grep -E ' (UseAVX|UseBASE64Intrinsics|DisableIntrinsic) '
Watch out

Don't bake -XX:UseAVX=2 into a multi-arch image. Calif warns that OpenJDK on ARM doesn't recognise the flag and will fail to start. If one image runs on both x86-64 and Graviton nodes, set the flag per node pool instead.

Note

A reverse proxy does not mitigate this. Calif found that nginx request buffering (proxy_request_buffering) breaks some of its exploits, but it is not a general defence: the Elasticsearch exploit still works, and WebSocket frames are not buffered.

Detecting exploitation attempts

As of November 17, no in-the-wild exploitation had been reported and CVE-2026-114938 was not in CISA's Known Exploited Vulnerabilities catalog, according to Endor Labs. Calif is withholding its weaponized chains until users upgrade. But its bounded trigger is public, and Endor notes that the fixed-pattern overwrite usually just crashes the JVM. So the most likely near-term impact is an unauthenticated crash (denial of service), even where code execution is hard.

Indicators to look for, mostly from Endor Labs' guidance:

  • JVM crash logs (hs_err_pid*.log) showing SIGSEGV in a GC copy routine with a Base64$Decoder.decode0 frame on the stack.
  • Bursts of IllegalArgumentException from java.util.Base64 during request handling. Java throws only after the out-of-bounds write has happened, so these exceptions are the clearest sign in application logs.
  • Base64 fields that end in = or == but whose length isn't a multiple of 4. Endor rates this the highest-fidelity network signal.
  • High-rate, unusually paced or fragmented Base64-heavy traffic from one source. Calif's exploits depend on heap grooming and network timing.
hunt-java4shell.sh
# JVM crash logs that mention the Base64 decoder (default location: the JVM's working directory)
find / -name 'hs_err_pid*.log' -mtime -14 2>/dev/null | xargs -r grep -l 'Base64\$Decoder'

# Decoder exceptions in application logs (exception messages from java.util.Base64, JDK 17)
grep -cE 'Input byte array has (wrong 4-byte ending unit|incorrect ending byte)|Last unit does not have enough valid bits' /var/log/<app>/*.log
TechniqueIDJava4Shell scenario
Exploit Public-Facing ApplicationT1190Pre-auth RCE against servers that decode request Base64, per Calif's named targets
Exploitation for Client ExecutionT1203Java client compromised by a malicious TLS server, per Calif
Endpoint Denial of Service: Application or System ExploitationT1499.004Crashing the JVM with the fixed-pattern overwrite
MITRE ATT&CK mapping for Java4Shell

Why dependency scanners miss it

Java4Shell is in the JDK, not in a Maven or Gradle dependency. A scanner that reads pom.xml or build.gradle and walks your dependency tree has nothing to match, because the JDK is never declared there. The affected component is whatever java binary ends up in your container image or on your host.

To catch it, your inventory has to include the runtime: an image-level SBOM that records the JDK package and its exact version, matched against the advisory. Check whether your scanner reports CVE-2026-114938 against your base images. If it doesn't, it isn't scanning the JDK, and it will miss future JVM bugs too.

What's still unconfirmed

  • Per-product exploitability. Calif claims pre-auth RCE in default configurations of six products and post-auth RCE in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. No public exploit chains exist yet to verify these claims independently.
  • The CVSS 4.0 vector behind Calif's 9.2 score, which hasn't been published.
  • Downstream fixed version numbers. Temurin, Corretto, Zulu, Red Hat and distro packages each number their fixed builds differently, so read the vendor's advisory.
  • Oracle's fixed build numbers for its commercial Java SE and GraalVM lines. Its risk matrix lists the affected versions; the fixed ones are in its patch notes.

php2shell last month was similar. Both bugs are in the language runtime rather than in application packages, so package-level scanners don't catch them. The response is also similar: find every runtime, check the conditions, upgrade and restart.

Frequently asked questions

What is Java4Shell?

+
Java4Shell is the name for CVE-2026-114938, a heap buffer overflow in the AVX-512 Base64 decoding fast path of OpenJDK's HotSpot JVM. A crafted, padded Base64 string makes the JIT-compiled stub write 62 or 63 bytes past a heap array. Calif disclosed it on November 17, 2026, alongside fixes from Oracle and OpenJDK.

Which Java versions are affected by Java4Shell?

+
OpenJDK 17.0.6 through 17.0.21.0.3, and 21, 25 and 27 releases up to 21.0.13.0.3, 25.0.5.0.3 and 27.0.1.0.3. The fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Standard Java 8 and 11 builds are not affected, although Oracle's 8u511b33-perf build is.

Is my server affected if it runs on ARM or AWS Graviton?

+
No. HotSpot only generates the vulnerable code on x86-64 CPUs with AVX-512 VBMI and AVX-512 BW, such as Intel Ice Lake and newer or AMD Zen 4 and newer. ARM64 hosts, including Graviton and Apple silicon, are not affected, and neither are Skylake-SP or Cascade Lake Xeons.

How do I mitigate Java4Shell without upgrading?

+
Start the JVM with -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_decodeBlock, or more broadly with -XX:-UseBASE64Intrinsics. On x86-64 hosts only, -XX:UseAVX=2 also works but disables all AVX-512 code. Confirm the flag with -XX:+PrintFlagsFinal and remove it once you've upgraded.

Is Java4Shell being exploited in the wild?

+
As of November 17, 2026, no in-the-wild exploitation had been reported and the CVE was not in CISA's KEV catalog. Calif has withheld its weaponized exploit chains, but a bounded trigger is public. The overwrite alone usually crashes the JVM, so denial of service is the most realistic near-term risk.

Why didn't my SCA scanner flag Java4Shell?

+
Because the vulnerable code is in the JDK runtime, not in a library declared in pom.xml or build.gradle, so manifest-based dependency scanners have nothing to match. You need an inventory of the runtime itself, such as an image-level SBOM that records the JDK package and its exact version.

See your full attack chain.
Code, build, runtime. One platform.