Your server could be hacked by a single login attempt that never even logs in — and the flaw is not in your code at all. Disclosed November 17, 2026, Java4Shell lets an attacker run code on unpatched Java servers without credentials — one flaw your business cannot afford to ignore.
What is Java4Shell? It is the nickname for CVE-2026-114938, a heap overflow in the HotSpot JVM’s hardware-accelerated Base64 decoder. A crafted Base64 string makes the decoder write 62 bytes past the end of a heap buffer — and the JVM only rejects the bad input after the damage is done. Calif, which found the flaw, showed it can become remote code execution on default installs of widely used products. Oracle and OpenJDK released fixes the same day, and CISA urged immediate patching.
![]()
What Is Java4Shell and How Does It Work?
Base64 encodes binary data as plain text. Login credentials, JWTs, cookies, and file uploads all rely on it, and decoding happens constantly on Java servers — often before the server checks who you are.
That timing is what makes Java4Shell so dangerous. Java’s built-in decoder is normally safe, but on modern server processors HotSpot swaps in a hand-tuned AVX-512 shortcut. The bug lives there: with = padding on the final group, the routine miscalculates how many bytes to write, and its masked store writes past the destination array. Only then does Java reject the malformed input — too late.
Why do 62 extra bytes matter? They corrupt neighboring heap objects. At minimum, the JVM crashes; at worst, Calif showed heap manipulation can steer that corruption into running attacker code. Oracle rates it 8.1 (High) under CVSS 3.1 and calls exploitation difficult, while Calif rates it 9.2 (Critical) under CVSS 4.0.
Picture it: one crafted login request to your self-hosted Jira server — no valid username, no password — and the vulnerable decoder corrupts the heap, giving the attacker code execution. No login required. One request.
Who Is Affected by the Java4Shell Vulnerability?
Three things must all be true for a system to be at risk. Miss any one, and you are safe.
![]()
- An affected Java build. Java 17 (17.0.6 and later), Java 21, Java 25, and Java 27. Java 8 and Java 11 are not affected, except Oracle’s Java 8 Performance Pack (8u511b33-perf).
- A vulnerable CPU. An x86-64 processor with AVX-512 VBMI — Intel Xeon Ice Lake or later, or AMD EPYC and Ryzen Zen 4 or newer. ARM64 systems and older CPUs without AVX-512 VBMI are not affected.
- Attacker-controlled Base64 reaching the decoder. The app must decode untrusted Base64 input — auth headers, tokens, cookies, or file uploads — using Java’s built-in decoder.
Affected distributions: Temurin, Corretto, Zulu, Red Hat OpenJDK, Microsoft Build of OpenJDK, Liberica, SapMachine, Oracle Java SE, and GraalVM. Bundled runtimes count too: many products ship their own Java runtime, so a vulnerable JDK can hide inside software you never think of as “Java.” Calif reports pre-auth RCE in default installs of Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate, and post-auth RCE in Kafka, Solr, Elasticsearch, Gerrit, and Spinnaker.
Affected and Fixed Java Versions
| Java line | Affected builds | First fixed build |
|---|---|---|
| Java 17 | 17.0.6 through 17.0.21.0.3 | 17.0.21.1 |
| Java 21 | Up to 21.0.13.0.3 | 21.0.13.1 |
| Java 25 | Up to 25.0.5.0.3 | 25.0.5.1 |
| Java 27 | Up to 27.0.1.0.3 | 27.0.1.1 |
| Oracle Java 8 Performance Pack | 8u511b33-perf | 8u513 |
Version trap: a runtime reporting 17.0.21 without the .1 is still vulnerable.
How to Check If You Are Vulnerable to Java4Shell
Do not guess — check. Here is how to check Java version vulnerable status and CPU support in minutes, on every server.
Step 1: Check your Java version
Run java -version and compare it against the table above. Java 17.0.6+, or any unpatched Java 21, 25, or 27 build, is affected. But do not stop at the system Java. Check bundled runtimes too — Jenkins, Elasticsearch, Kafka, and Keycloak often ship their own JDK.
Step 2: Check your CPU for AVX-512 VBMI
On Linux, run:
grep -om1 -E 'avx512[_]?vbmi' /proc/cpuinfo
A match means the vulnerable code path can run; no match means you are not affected. Prioritize internet-facing services on an affected Java version with AVX-512 VBMI.
Step 3: Check whether untrusted Base64 reaches the decoder
Does your app decode Base64 from the network before authentication? For most web apps, yes. If unsure, treat it as reachable and patch anyway. Patching is cheaper than being wrong.
![]()
How to Fix the Java4Shell Vulnerability
Patching is the real fix. The OpenJDK Base64 vulnerability patch is straightforward: update to your vendor’s fixed build and restart every JVM.
- Oracle Java SE: upgrade to 17.0.21.1, 21.0.13.1, 25.0.5.1, or 27.0.1.1 (or 8u513 for the Java 8 Performance Pack).
- Other distributions: install your vendor’s equivalent fixed build on its own schedule.
- Restart every JVM after updating. A patched JDK on disk protects nothing until the running process restarts.
- Rebuild container images with the fixed base image. Verify the Java version inside the running container — do not trust the image tag.
- Check bundled runtimes in third-party products, and apply each vendor’s patch as soon as it is available.
After patching, verify. Run java -version again and confirm the .1 build. If you need help auditing your infrastructure, see our services or contact us. For spotting a breach, see our guide on how to check if your
What to Do If You Cannot Patch Java4Shell Yet
If patching must wait — a vendor fix has not shipped yet, or a maintenance window is days away — use one of these interim JVM flags:
-XX:-UseBASE64Intrinsics— disables the fast Base64 decoder and falls back to the safe Java decoder. Works on any architecture and is the safest stopgap.-XX:UseAVX=2— limits the JVM to AVX2 instructions, avoiding the vulnerable AVX-512 path. Use this only on x86-64 systems: ARM JVMs will fail to start with this flag.
Apply it via JAVA_TOOL_OPTIONS so it picks up at JVM startup.
Treat flags as a temporary shield, not a cure. Schedule the real patch as soon as your vendor’s fixed build ships, and meanwhile validate Base64 input and limit unauthenticated access. One warning: a claim that the flaw was fixed in 17.0.11 or 21.0.3 refers to an unrelated bug. Attackers adapt fast — see our article on why Chinese AI models are removing hacking skills.
Java4Shell Attack Scenario: How One Request Becomes Remote Code Execution
A Java4Shell attack starts with a single crafted request. No login, no password, no second step. The attacker sends a login request carrying a specially built Base64 string, and the server decodes it before it checks who the attacker is. That ordering is the heart of Java4Shell: the vulnerable decoder runs on untrusted input before authentication, so the flaw is reachable by anyone who can reach the login page.
Base64 turns binary data into plain text, and Java servers decode it constantly: login credentials, JWTs, cookies, and file uploads. When a request arrives, the server hands the Base64 to the built-in Java decoder. On a modern server CPU with AVX-512 VBMI, HotSpot swaps in a hand-tuned fast decoder. That fast path is where Java4Shell lives. The crafted input ends with a particular pattern of padding on the final group, and the routine miscalculates how many bytes to write. Its masked store writes 62 bytes too many, past the end of the heap buffer.
Those 62 extra bytes corrupt neighbouring heap objects. At minimum the JVM crashes. At worst, Calif showed the corruption can be steered into running attacker code. Oracle rates it 8.1 High under CVSS 3.1 and calls exploitation difficult, while Calif rates it 9.2 Critical under CVSS 4.0. Either way, a single request can turn into remote code execution on an unpatched server. The attacker does not need a valid username or password. One request is enough.
Picture a self-hosted Jira server, or any Java web app that decodes Base64 from the network before authentication. The attacker sends one crafted login request. No valid username, no password, no session. The decoder runs, the overflow corrupts the heap, and the attacker gains code execution. That is why Java4Shell is rated critical even though it needs specific conditions: where those conditions hold, the impact is total.
The narrow conditions do not make Java4Shell a minor flaw. Java runs everywhere, and many products bundle their own Java runtime, so a vulnerable JDK can hide inside software you never thought to patch. Jenkins, Elasticsearch, Kafka, and Keycloak often ship their own JDK. A single unpatched runtime on an internet-facing server is enough. That is the real Java4Shell risk: not that every server is vulnerable, but that the vulnerable ones are hard to find and easy to exploit.
Patching closes the hole, but only if you find every runtime. Check the system Java, check bundled runtimes, check containers, and confirm the fixed build. Until then, the interim flags buy time. A Java4Shell attack needs only one request, so do not wait for a second warning.
The disclosure timeline shows how fast this moves. Java4Shell was disclosed on November 17, 2026, and Oracle and OpenJDK released fixes the same day, with CISA urging immediate patching. As of November 18, 2026, no exploitation in the wild has been confirmed, and the flaw is not in the CISA Known Exploited Vulnerabilities catalogue. That quiet window will not last. Attackers adapt fast, and a public proof of concept means the technique is already understood. Patch now, while the window is still open, and do not assume the absence of attacks means the absence of risk.
After the Java4Shell Patch: What to Verify and What to Watch
Patching is only the first step. A patched JDK on disk protects nothing until the running process restarts, so verify the fix the same way you checked for the flaw. Run java -version again and confirm the .1 build, such as 17.0.21.1 or 21.0.13.1 If the version still shows the old build, the update did not take, or you are looking at the wrong runtime. Check every server, not just the one you patched first. A Java4Shell fix that only covers half your fleet is not a fix.
Watch for the version trap. A runtime reporting 17.0.21 without the .1 is still vulnerable, and the same applies to 21.0.13, 25.0.5, and 27.0.1. Do not trust the version a dashboard reports; check the running process itself. Container images are a common blind spot. Rebuild them with the fixed base image and verify the Java version inside the running container, not just the image tag. A rebuilt image that still runs the old JDK changes nothing.
Check bundled runtimes again after patching. Jenkins, Elasticsearch, Kafka, and Keycloak often ship their own JDK, and each vendor patches on its own schedule. A system Java update does not touch them. Go through your third-party products one by one and apply each vendor patch as soon as it is available. If a vendor fix has not landed yet, keep the interim flag in place and set a date to revisit it. Do not let a temporary shield become permanent.
Remove the interim flags once the real patch is in. The flags -XX:-UseBASE64Intrinsics and -XX:UseAVX=2 were a stopgap, not a cure. Leaving them on costs performance and hides the fact that a runtime is still unpatched. Once every JVM runs a fixed build, take the flags out of JAVA_TOOL_OPTIONS and restart. Then confirm the flags are gone and the fixed build is running. That is the only way to know the Java4Shell hole is closed for good.
Keep watching after the patch. As of November 18, 2026, no exploitation in the wild has been confirmed, and the flaw is not in the CISA Known Exploited Vulnerabilities catalogue. GreyNoise has observed scanning, so the window before exploitation begins is already narrowing. Monitor your logs for unusual Base64 traffic and failed login attempts, and watch for new CISA guidance. Attackers adapt fast, and a public proof of concept means the technique is already understood.
Use this as a reason to tighten long-term hygiene. Keep an inventory of every Java runtime you run, including bundled ones and containers, so the next flaw does not send you hunting. Patch on a schedule, not only when a critical flaw makes the news. Validate Base64 input and limit unauthenticated access where you can. A single Java4Shell request was enough to take a server; the best defence is a fleet where no runtime is ever far behind.
Do not forget the services that depend on Java. A web app is the obvious target, but the flaw lives in the runtime, so any service that decodes Base64 before authentication is exposed. That includes the tools your team uses every day and the ones running quietly in the background. Walk through your inventory and ask, for each service, which Java it runs and whether it takes Base64 from the network. The Java4Shell risk is not in the app you know about; it is in the runtime you forgot.
If you run Java in the cloud, check there too. Managed services and containers can hide a vulnerable JDK behind a dashboard that reports a healthy version. Verify the runtime inside the running container, and confirm your base images carry the fixed build. Rebuild and redeploy, then check again. The cloud does not patch itself, and a container that was safe last month may still run the old build today. A Java4Shell check that stops at the system Java misses the runtimes that matter most.
Java4Shell FAQ
What is Java4Shell (CVE-2026-114938)?
Java4Shell CVE-2026-114938 is a heap out-of-bounds write in the HotSpot JVM’s AVX-512 Base64 decoder: a malformed Base64 string writes 62 bytes past a heap buffer before the JVM rejects it, which Calif showed can lead to unauthenticated remote code execution.
Is Java4Shell exploited in the wild?
As of November 18, 2026, no exploitation in the wild has been confirmed, and the flaw is not in CISA’s Known Exploited Vulnerabilities catalog. GreyNoise has observed scanning. Patch now — before exploitation begins.
Which Java versions are affected by Java4Shell?
Java 17 (17.0.6 and later), Java 21, Java 25, and Java 27, on x86-64 CPUs with AVX-512 VBMI. Java 8 and Java 11 are not affected, except Oracle’s Java 8 Performance Pack. ARM64 systems and CPUs without AVX-512 VBMI are not affected.
How do I check if my server is vulnerable to Java4Shell?
Run java -version for your Java build, then grep -om1 -E 'avx512[_]?vbmi' /proc/cpuinfo on Linux for your CPU. You are at risk only if both point to affected versions and hardware — and your app decodes untrusted Base64 input. Check bundled runtimes too.
What is the Java4Shell vulnerability fix?
Update to a patched build (17.0.21.1, 21.0.13.1, 25.0.5.1, or 27.0.1.1 for Oracle), restart every JVM, and rebuild container images. If you cannot patch yet, use -XX:-UseBASE64Intrinsics (or -XX:UseAVX=2 on x86-64 only) as a stopgap.
Conclusion: Patch Java4Shell Before Attackers Catch Up
Java4Shell is a rare combination: a critical flaw, a public proof of concept, and a fix already available. It is narrow — a specific Java version, CPU feature, and attacker-controlled Base64 — but where those three meet, the impact is severe: unauthenticated remote code execution.
Takeaway: check your Java version and CPU today, patch to the .1 fixed build, restart every JVM, and rebuild your container images. If a vendor fix has not landed yet, apply -XX:-UseBASE64Intrinsics now and patch the moment it ships. No confirmed exploitation yet — but that window will not stay open long.
Sources: CISA’s alert, the Censys advisory, and Black Duck’s analysis.