How to Check and Patch the Java4Shell Vulnerability (CVE-2026-114938)
Java4Shell is a heap overflow in the JVM's own AVX-512 Base64 decoder that affects Java 17.0.6+ and 21, 25 and 27 on newer Intel and AMD servers. Here's how to tell whether a running JVM is exposed, which vendor builds fix it, and which flag to use until you can patch.

The Java4Shell vulnerability (CVE-2026-114938) is a heap memory corruption bug in the JVM's own Base64 decoder. It affects OpenJDK 17.0.6 and later, plus Java 21, 25 and 27, but only on x86-64 CPUs that support AVX-512 VBMI. To fix it, install your vendor's November 17, 2026 JDK build and restart every Java process. Upgrading your application or framework does not fix it.
This guide covers how the bug works and which versions, CPUs and applications are exposed. It also gives the exact commands to check a running server, lists the fixed builds from each vendor with which vendors have not shipped yet, and explains the two JVM flags you can use until you can patch. It is written for people running Jira, Confluence, Jenkins, Keycloak, Artifactory or their own Java services on x86-64 servers, whether on-premises or in the cloud.
What the Java4Shell vulnerability is (CVE-2026-114938)
Java4Shell is a memory-corruption flaw in HotSpot, the JVM inside most OpenJDK distributions. It lives in a hand-written assembly routine that HotSpot uses to speed up Base64 decoding. That routine only runs on newer Intel and AMD server chips. Calif, the research firm that found and reported it, says an attacker with no credentials can use it to overwrite heap memory, read memory in the style of Heartbleed, and reach remote code execution.
The Java4Shell vulnerability is in the Java runtime, not in an application library. Java promises memory safety, but a few hot paths in the runtime are still written in C++ or assembly. A bug there can affect any program that runs on that runtime. As a result, any service that decodes untrusted Base64 through java.util.Base64 on an affected JVM may be exposed. That includes HTTP Basic credentials, JWTs and SAML data.
The two official scores differ, and both are worth knowing:
Calif: 9.2 (Critical) under CVSS 4.0. We did not find a published vector string for this score.
OpenJDK and Oracle: 8.1 (High) under CVSS 3.1. The vector is network attack, high complexity, no privileges, no user interaction, and high impact on confidentiality, integrity and availability, according to the OpenJDK advisory of November 17, 2026 and Oracle's November 2026 Critical Security Patch Update.
The "high complexity" rating is a reasonable reading of the bug. A crash is easy to cause. Turning the corruption into code execution takes work tailored to each application.
The disclosure was not orderly. Calif said on X on November 17 that details had leaked. It published its full technical write-up only after Oracle shipped fixes at 1:00 p.m. Pacific that day, which is 2:30 a.m. IST on November 18 by our conversion. Oracle credits both Quang Luong of Calif.io and Albert Yang for the CVE.
How does a Base64 string end up corrupting the Java heap?
When a Java method is called often enough, the C2 JIT compiler (HotSpot's optimizing compiler) recompiles it into native code. For some library methods, C2 doesn't compile the Java source at all. Instead it swaps in an intrinsic: a pre-written, CPU-specific routine that does the same job faster. Base64.Decoder has one of these. On x86-64 CPUs with AVX-512 VBMI (Vector Byte Manipulation Instructions), HotSpot uses a decode routine that handles 64 bytes at a time.
The code behind Java4Shell arrived with JDK-8268276, which added the AVX-512 decode intrinsic in JDK 18. It was backported to Java 17 in update 17.0.6, according to HeroDevs. OpenJDK 17.0.6 shipped in January 2023, so the vulnerable code has been in production builds for almost four years.
Calif's write-up walks through the failure step by step:
The intrinsic works through the input in 256-byte blocks, then 64-byte blocks. It handles the final short tail with a masked vector store, where a 64-bit mask decides which bytes get written.
For the padded tail, the code computes an output length and subtracts one byte for each
=padding character. For certain short, padded tails, the expected length is already zero before that subtraction, so the result underflows to -1 or -2. One knowledge-base write-up classifies the flaw as CWE-191, integer underflow.A negative length turns the store mask into all ones. The store then writes all 64 bytes instead of the few it should.
In Calif's example, a 50-byte output buffer receives a 64-byte write starting at offset 48. That lands 62 bytes past the end of the array, at offsets 50 to 111.
The routine then returns early because the input is invalid, and Java throws
IllegalArgumentException. By then the neighboring heap object has already been overwritten.
Other researchers have reproduced parts of this. Endor Labs reports 62 bytes for a single-= tail and 63 for a double-== tail. It got these results under an AVX-512 emulator on Temurin 17.0.10 and 17.0.12. Endor and others also found that the overwritten bytes have a fixed value that the attacker does not choose. Datadog Security Labs concludes that denial of service is the easier outcome. Reliable code execution needs extra work tailored to each application and JVM setup, which Calif says it did by grooming the heap.
Only the basic and URL-safe decoders reach this code. Endor lists the MIME decoder, and Base64 libraries that don't call java.util.Base64, as not affected.

Which Java versions, CPUs and apps are affected
A host is exposed to the Java4Shell vulnerability only when all three conditions hold. It runs an affected JDK build, on an x86-64 CPU with AVX-512 VBMI, and attacker-controlled Base64 reaches the standard decoder. The table below combines Calif's write-up, the OpenJDK risk matrix (which marks the 17, 21, 25 and 27 lines) and Qualys's affected-systems breakdown.
| Component | Affected | Not affected |
|---|---|---|
| Java 17 | 17.0.6 and later, up to the November 17, 2026 fix | 17.0.0 to 17.0.5 |
| Java 18 and later | Every release line from 18 up, including 21, 25 and 27, before the fix | Fixed builds (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and vendor equivalents) |
| Java 8 and 11 | Only Oracle's Java SE 8 Enterprise Performance Pack 8u511b33-perf | Standard Java 8 and 11 builds |
| Intel CPUs | Xeon Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids | Skylake-SP, Cascade Lake and other chips without AVX-512 VBMI |
| AMD CPUs | Zen 4 and newer (EPYC and Ryzen) | Zen 3 and older |
| ARM64 | None | AWS Graviton, Apple silicon, other ARM64 servers |
| Decoder | Basic and URL decoders in java.util.Base64 | MIME decoder; libraries that don't call java.util.Base64 |
Calif lists these OpenJDK builds as affected: 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. In the cloud, Upwind names AWS families "such as" c6i, m6i, c7i, c7a and m7a. That list is not complete. For Azure, GCP or on-premises hosts, check the CPU flags yourself rather than going by instance names.
Which apps does Calif say are exploitable?
Calif says it demonstrated code execution against the products below, in their default configurations. These are Calif's claims. Calif has withheld the product exploits, so no one has independently confirmed them, and we found no Atlassian, Jenkins or Keycloak advisory as of November 18. Calif also says the lists are not exhaustive.
| Calif's claim | Applications |
|---|---|
| Pre-authentication RCE (no login) | Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederate |
| Post-authentication RCE (needs an account) | Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker |
| Other demonstrations | Sample apps built on Apache Struts and Spring Boot; a client-side exploit against a Java program that connects to a malicious TLS server |
Some secondary write-ups list Kafka, Gerrit or Spring Boot as pre-auth. Calif's own page puts Kafka and Gerrit in the post-auth group, and Spring Boot only as a sample app.
Your own services need the same review. In Upwind's lab, Spring Security, Basic auth in Tomcat and Jetty 12, and Auth0's java-jwt library all passed attacker-supplied tokens to the vulnerable decoder before any login check. HeroDevs makes a related point: no Spring, Tomcat or Jetty release fixes this CVE, and upgrading one does not close it.
How to check your servers for Java4Shell
Check the JVM that is actually running, not just the java command on your PATH. Endor Labs and HeroDevs both warn that bundled runtimes and container base images often pin older JDKs. Run these on each Linux host.
Find running Java processes.
ps -eo pid,args | grep '[j]ava'Find the binary each process runs. This shows whether a product uses its own bundled JRE.
readlink -f /proc/<pid>/exeAsk the live JVM for its version. Run
jcmdas the same user that owns the process.jcmd <pid> VM.versionYou can also run the binary from step 2 with
-version:/path/from/step2/java -versionCheck the CPU for AVX-512 VBMI. No output means the CPU lacks the feature.
grep -o -w -m1 avx512vbmi /proc/cpuinfoCalif's stricter check needs all four flags in the output:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'Repeat inside containers. The JDK comes from the image, but the CPU comes from the node. Upwind notes that the same image can be exposed on one node and safe on another.
docker exec <container> java -version kubectl exec <pod> -- java -version kubectl exec <pod> -- grep -o -w -m1 avx512vbmi /proc/cpuinfo
If the version is in the affected Java4Shell range and the CPU check prints avx512vbmi, treat the host as vulnerable until it is patched. If you want proof on your own hardware, Calif publishes a bounded reproducer. It is a standalone Java program that prints REPRODUCED on an affected JDK, and every write stays inside a real array. HeroDevs advises running it locally on the same CPU and JDK as production, never against a live service. It also warns that a NOT REPRODUCED result on older Java 17 builds is not conclusive.
Fixed builds for CVE-2026-114938 by vendor
Vendor build numbers can be confusing. Oracle's advisory lists 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3 and 27.0.1.0.3 as the affected versions. Those are the last vulnerable builds. The fixes are the ".1" releases. The OpenJDK advisory puts the fix in 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, as quoted in the Adoptium release-status issue. The advisory's risk matrix and the CVE record both name CVE-2026-114938, so Oracle's November update does cover it.
| Vendor | Fixed build | Status on Nov 18, 2026 |
|---|---|---|
| OpenJDK (upstream) | 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 | Released Nov 17 |
| Oracle Java SE | 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1; 8u513-perf for the Performance Pack | Released Nov 17 |
| Oracle GraalVM for JDK / Enterprise | Affected: 17.0.21.0.3, 21.0.13.0.3; EE 21.3.20.0.3 | Fixed build numbers not found in the sources we checked |
| Amazon Corretto | 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4 | Released; listed in AWS ALAS |
| Azul Zulu | 17.70.201 (17.0.21.1+2), 21.54.201 (21.0.13.1+2), 25.38.201 (25.0.5.1+2), 27.30.201 (27.0.1.1+4) | Released; named in Azul's November release notes |
| Eclipse Temurin | Not yet published | Pending. Latest builds were still 17.0.21+9 and 21.0.13+9 on Nov 18 |
| Red Hat (RHEL 8, 9, 10; Red Hat build of OpenJDK 17, 21, 25) | Not yet published | Pending. RHSB-2026-018 says Red Hat is expediting fixes |
| Microsoft Build of OpenJDK, Ubuntu, Debian, BellSoft, SAP | No advisory found | Unconfirmed. Check each vendor's tracker |
| Java 26 (non-LTS) | None expected | HeroDevs says Temurin and Corretto have ended Java 26 updates. Move to 25 or 27 |
Installing the package is not enough. Restart every JVM, rebuild and redeploy container images, and confirm the new build with jcmd <pid> VM.version. Products that ship their own runtime, such as Elasticsearch, need the vendor's updated release. Patching the host's Java does not change a bundled JDK. This is the same lesson as runtime-level bugs like HTTP2Shell in Node.js's Brotli decoder and the PHP2Shell runtime patches: the fix lives in the runtime, so it reaches every app at once, but only after each process restarts.
Interim workarounds if you can't patch today
Calif, Qualys and Red Hat each describe JVM flags that switch off the vulnerable path. Both need a restart, neither replaces the patch, and you should remove both once you are on a fixed build.
| Flag | What it does | Trade-off |
|---|---|---|
-XX:-UseBASE64Intrinsics (try first) | Turns off hardware-accelerated Base64 encode and decode. Java falls back to its standard decoder | Heavy Base64 workloads may slow down. Upwind found it stopped the overflow on every affected version it tested and says it works on any architecture |
-XX:UseAVX=2 (fallback) | Turns off AVX-512 entirely | Wider performance cost. x86-64 only: on ARM64 the JVM does not recognize it and will not start |
For a mixed fleet, the first flag is the safer Java4Shell stopgap because it can't stop an ARM host from booting. One way to apply it is through the JAVA_TOOL_OPTIONS environment variable, which every HotSpot JVM reads at startup:
export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"Verify the result, because a flag in a config file does nothing if the service's startup script never reads it. HeroDevs recommends checking effective values with PrintFlagsFinal:
java -XX:-UseBASE64Intrinsics -XX:+PrintFlagsFinal -version | grep -E 'UseAVX|UseBASE64Intrinsics'For a JVM that is already running, ask it directly:
jcmd <pid> VM.flags -all | grep -E 'UseAVX|UseBASE64Intrinsics'Avoid one trap. Upwind reports that -XX:DisableIntrinsic=_base64_decodeBlock on its own stops the JVM from starting, and that pushing it fleet-wide through JAVA_TOOL_OPTIONS causes an outage. Qualys and HeroDevs add that a reverse proxy or body buffering is not a reliable control.
Is Java4Shell being exploited, and what should you patch first?
As of November 18, 2026, no one has reported in-the-wild exploitation. Cisco Talos says it has not seen any yet but expects probing to start soon after disclosure. The CVE is not in CISA's Known Exploited Vulnerabilities catalog. CISA's own enrichment on the CVE record rates exploitation "none" for now. For context on what a KEV listing means and how fast it can change, see our explainer on recent CISA KEV additions.
The Java4Shell exploit picture has three layers:
Public: the trigger and root cause, plus Calif's bounded reproducer, which proves the memory corruption but is not a remote exploit.
Withheld: Calif's product-specific chains. Calif says it will publish them after users have had time to upgrade. It also says its researcher built a first working exploit within about two hours of finding the bug.
Commercial: VulnCheck says a full RCE exploit has been available to its paying Initial Access Intelligence customers since November 17. VulnCheck sells that service, which is worth keeping in mind.
HeroDevs also warns that fake "PoC" repositories have appeared on GitHub. Don't run unreviewed code from them on production hosts.
Qualys suggests a patch order that fits Calif's application list. Here it is as a checklist you can work through:
List every JVM: host installs, bundled runtimes, container images and vendor appliances.
Mark the ones on x86-64 hosts that report
avx512vbmi.Patch internet-facing identity providers first (Keycloak, PingFederate), then internet-facing Jira, Confluence, Jenkins and Artifactory.
Until those are patched, restrict external access to them. Put them behind a VPN or an IP allowlist, and keep admin interfaces on management networks only.
Patch other internet-facing Java services that handle logins, tokens or uploads, then internal systems like Kafka, Solr, Elasticsearch and Gerrit.
Where the vendor build is still pending (Temurin, Red Hat), apply
-XX:-UseBASE64Intrinsicsand verify it on the running process.After patching, remove the flag, confirm the build with
jcmd, and set a reminder to recheck KEV and vendor advisories.Rotate secrets on any internet-facing service that crashed without explanation after November 17 on an affected JDK, as HeroDevs advises.
For log hunting, SentinelOne suggests flagging Base64 values that meet all four conditions:
The total length is 65 or more.
The length modulo 64 is 1, 2 or 3.
The value ends in one or two
=characters.Every other character is from the standard alphabet.
An unexpected IllegalArgumentException from the decoder near a JVM crash is another signal worth checking.
My take on Java4Shell
My read is that the "Shell" name oversells how easy this is to attack, and undersells how hard it is to find across a fleet. Crashing a service is simple. Code execution needs a heap-grooming chain built for each product, and the bytes written past the buffer are fixed. That is why Oracle scores the attack complexity as high.
The harder part is the inventory: Java4Shell sits below every dependency scanner. A pom.xml won't reveal it, and the same container image can be safe on one node and vulnerable on the next. If your team can't say which JDK build each production process is running right now, treat that as a gap to fix after this patch.
It also makes a good interview topic. Students preparing for security roles can practice explaining it with our cybersecurity interview questions: it is a clean example of why "memory-safe language" does not mean "memory-safe runtime".
The bottom line on Java4Shell
If any Java 17.0.6+ or Java 21/25/27 process runs on an x86-64 host that reports avx512vbmi, patch it to your vendor's November 17 build and restart it this week. Start with internet-facing Keycloak, Jira, Confluence, Jenkins and Artifactory. If your vendor hasn't shipped yet, restrict access and run -XX:-UseBASE64Intrinsics today. Hosts on ARM64, standard Java 8 or 11, or CPUs without VBMI need no action for the Java4Shell vulnerability.
Frequently asked questions
Does upgrading Spring Boot, Tomcat or Jetty fix Java4Shell?
No. The bug is in the JDK's HotSpot runtime, and HeroDevs notes that no Spring, Tomcat or Jetty release fixes CVE-2026-114938. You need your JDK vendor's November 17, 2026 build, followed by a restart of every Java process.
Am I affected if my servers run on AWS Graviton or another ARM64 chip?
No. The vulnerable decoder is x86-64 assembly that runs only on CPUs with AVX-512 VBMI. Calif and Red Hat both list ARM64 as not affected. Don't put -XX:UseAVX=2 on ARM hosts, though, because the JVM won't start with it.
Is Java 8 or Java 11 affected by Java4Shell?
Standard Java 8 and 11 builds don't contain the AVX-512 Base64 decode intrinsic, so they are not affected. The one exception is Oracle's Java SE 8 Enterprise Performance Pack build 8u511b33-perf, which Oracle lists as affected and fixes in 8u513-perf.
What is the difference between the 9.2 and 8.1 scores?
Calif scores Java4Shell 9.2 (Critical) under CVSS 4.0. OpenJDK and Oracle score it 8.1 (High) under CVSS 3.1, with network access, high attack complexity and no privileges needed. The two use different scoring systems, so the numbers aren't directly comparable.
Is there a public exploit for CVE-2026-114938?
Calif published a bounded reproducer that proves the memory corruption but is not a remote exploit. It is withholding its product-specific exploit chains until users have had time to upgrade. VulnCheck says a full RCE exploit is available to its paying customers. HeroDevs warns that fake PoC repositories have appeared on GitHub.
Will -XX:-UseBASE64Intrinsics slow my application down?
It can. With the flag set, Java falls back to its standard Base64 decoder, so Qualys advises testing services that do heavy Base64 work. Remove the flag once you're on a fixed build.
Concepts in this article
- CVE
- The public identifier system for disclosed security vulnerabilities.
- Authentication and MFA
- Proving who a user or service is, with passwords, keys, tokens and multi-factor checks.
- Buffers
- Fixed-size chunks of raw binary data in Node.js.
- CISA KEV catalog
- The US list of vulnerabilities known to be exploited in the wild.
- Node.js
- A JavaScript runtime for servers and tools, built on V8 and libuv.
- Numbers
- Floating-point numbers, BigInt, NaN and precision pitfalls.
- Remote code execution (RCE)
- A flaw that lets an attacker run their own code on a system over the network.
- Vulnerability management
- Finding, ranking and fixing vulnerabilities across systems.



