The short version#
| Name | Java4Shell, CVE-2026-114938 |
| Disclosed | 17 November 2026, with patches the same day |
| What | Memory corruption in the JDK’s hardware-accelerated Base64 decoder (HotSpot, x86-64) |
| Worst case | Remote code execution with no login |
| Severity | 8.1 High from Oracle; 9.8 Critical from Red Hat |
| Fix | Update the JDK (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or your vendor’s equivalent) |
| Stopgap | Start Java with -XX:-UseBASE64Intrinsics |
First, what is Base64?#
Base64 is a way to write any data, even a picture or a key, using only 64 safe characters: A–Z, a–z, 0–9,
+ and /. The text is padded with = at the end when the data doesn’t fill the last block. You see it
everywhere without noticing:
- the
Authorization: Basic ...header that carries a username and password; - login tokens (JWTs) and “remember me” cookies;
- files and images sent inside JSON;
- keys and certificates (
-----BEGIN CERTIFICATE-----is Base64 inside).
Because so much arrives as Base64, servers decode it early, often before they know who you are. That detail is what makes this bug serious.
What went wrong#
Java has an ordinary Base64 decoder written in Java. For speed, the HotSpot JVM also has a hand-written assembly version that it swaps in once a method gets busy. On modern x86-64 processors with the AVX-512 VBMI instructions, that version decodes 64 characters at a time.
According to the researchers at Calif, the trouble is in the bit that handles the
last few characters. When the tail of the input is only padding (=), the length it calculates for the output
drops below zero. A negative length then turns into “write everything”: a full 64-byte write into a space meant
for far less.
With their trigger, 64 letter As followed by one =, the decoder writes 62 bytes past the end of a 50-byte
buffer. Java does reject the input in the end, but as the researchers put it, “by then neighboring objects may
already be corrupted.”
Overwriting memory next to your buffer is the classic first step towards making a program run the attacker’s instructions. That’s the “shell” in the name, which echoes Log4Shell, the 2021 Java logging bug.
An example: innocent code, exposed#
Nothing about vulnerable code looks wrong. This is a typical way to read a Basic login header:
// "Authorization: Basic dXNlcjE6c2VjcmV0" -> "user1:secret"
String header = request.getHeader("Authorization");
if (header != null && header.startsWith("Basic ")) {
byte[] raw = Base64.getDecoder().decode(header.substring(6)); // decoded BEFORE the password check
String[] userAndPassword = new String(raw, StandardCharsets.UTF_8).split(":", 2);
// ... check the password
}The decode call runs for every visitor, logged in or not. On a busy server it gets called thousands of times,
so the JVM switches it to the fast path. An attacker doesn’t need an account; they only need to send a header
the server will decode.
The same is true of other places Base64 shows up. The Apache Shiro project explained that its
remember-me cookie is decoded through
java.util.Base64, so requests on that path “may reach the vulnerable code”. Their note is clear that this is a JDK
bug, not a Shiro one: “changing Shiro versions alone does not fix a vulnerable JDK”.
The researchers report working pre-login exploits against default setups of well-known Java products, among them Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate (as summarised on oss-security). They have held back the full exploit chains for now.
Am I affected?#
All three of these must be true:
| Condition | Affected | Not affected |
|---|---|---|
| Java version | OpenJDK 17.0.6 or newer, before the November fix | OpenJDK 8 and 11 don’t contain the vulnerable code (Red Hat) |
| Processor | x86-64 with AVX-512 VBMI: Intel Xeon Ice Lake and later, AMD Zen 4 and later | ARM64 (Graviton, Apple silicon), and older x86 chips |
| Code path | Base64 decoding busy enough to be JIT-compiled | Code that rarely decodes Base64 |
It doesn’t matter whose build you run. Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat and Oracle builds are all listed as affected.
Two quick checks on a Linux server:
# 1. Which Java? (look for 17, 21, 25 or 27)
java -version
# 2. Does this CPU have the instructions? All four names printed means yes.
grep -o -w -E 'avx512f|avx512bw|avx512vbmi|bmi2' /proc/cpuinfo | sort -uIn the cloud, the CPU depends on the instance type, so two servers running the same image can give different answers. Treat any x86-64 server as possibly affected until you’ve checked.
What to do#
Find every Java. CISA reminds us that JDKs bundled inside products, container images and appliances “may not appear as separate inventory entries”. Look inside your images, not just at the host.
Update the JDK from your vendor, starting with internet-facing services. The fixed builds end in
.1, for example Ubuntu’s packages are based on 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, and Corretto 27.0.1.1.4 lists the CVE as fixed. Rebuild container images; a running container doesn’t update itself.If you can’t update today, turn off the fast path and restart:
export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"The alternative,
-XX:UseAVX=2, switches off AVX-512 entirely. Use it only on x86-64: OpenJDK on ARM won’t start with it. Either flag is a stopgap, not a fix.Watch for crashes. A malformed decode can crash the JVM before it does anything worse. Unexpected
hs_errcrash files on a public service are worth a look.
You can confirm the stopgap took effect:
java -XX:-UseBASE64Intrinsics -XX:+PrintFlagsFinal -version | grep UseBASE64Intrinsics
# bool UseBASE64Intrinsics = false {product} {command line}How worried should you be?#
Fair questions, fair answers:
- Is it being exploited? When CISA recorded it on 17 November, its assessment listed exploitation as “none” so far. That can change quickly once the details are public.
- Why two scores? Oracle gives 8.1 because it rates the attack as hard to pull off (each target needs its own memory layout). Red Hat gives 9.8 because public research already shows working exploits. Either way, it’s in the “patch this week” pile.
- Is my laptop at risk? Much less. The risk is a server decoding untrusted Base64 from the internet, all day.
Takeaways#
- Java4Shell is a memory bug in Java’s fast, CPU-specific Base64 decoder, not in your code or your libraries.
- Base64 is decoded early, often before login, so an attacker needs no account.
- You’re exposed only with Java 17.0.6+ on an x86-64 CPU with AVX-512 VBMI and a busy decoder. Check all three.
- Update the JDK everywhere, including inside images. Use
-XX:-UseBASE64Intrinsicsonly until you can.
Keywords#
| Term | What it means |
|---|---|
| CVE | A public ID for one security bug, so everyone talks about the same thing |
| Base64 | A way to write any data with 64 safe text characters, padded with = |
| JDK / JVM | The Java toolkit, and the engine inside it that runs Java programs |
| HotSpot | The JVM used by OpenJDK and nearly every Java build |
| JIT | “Just in time” compilation: the JVM turns busy code into fast machine code while it runs |
| Intrinsic | A hand-written, CPU-specific version of a library method that the JIT swaps in for speed |
| AVX-512 VBMI | Instructions on newer Intel and AMD server chips that process 64 bytes at once |
| Buffer overflow | Writing past the end of the memory set aside for something, into its neighbours |
| Remote code execution (RCE) | An attacker making your server run their instructions over the network |
| CVSS | A 0–10 severity score; 7–8.9 is High, 9–10 Critical |
References#
- Java4Shell: Calif, the researchers’ write-up, root cause, trigger, CPU flags and workarounds
- CVE-2026-114938: NIST NVD, Oracle’s description, affected versions and the 8.1 score
- CVE-2026-114938 record: CVE Program, CWE-122 and CISA’s assessment (exploitation: none)
- oss-security post, 17 November 2026: Openwall, affected distributions, CPUs and named products
- Critical Java vulnerability requires immediate patching: CISA, inventory, patching and compensating controls
- CVE-2026-114938: Red Hat, the Critical 9.8 rating and that OpenJDK 8 and 11 are not affected
- CVE-2026-114938: Ubuntu, fixed package versions
- Corretto 27 changelog: Amazon, 27.0.1.1.4 released 17 November 2026 with the fix
- Apache Shiro and Java4Shell: Apache Shiro, the remember-me cookie path and the
JAVA_TOOL_OPTIONSstopgap



