November 17, 2026: Java4Shell (CVE-2026-114938) is a heap out-of-bounds write in the Java virtual machine's hardware-accelerated Base64 decoder. It affects Java 17.0.6 and later, plus Java 21, 25 and 27, on x86-64 servers whose CPUs support AVX-512 VBMI. One malformed string, sent before any login, is enough to trigger it. Oracle and OpenJDK confirmed and patched it today, and the researchers who found it say they have turned it into remote code execution in Jenkins, Jira, Confluence and Keycloak.
The bug was found by Calif, the team behind October's Php2Shell flaws in PHP. Details leaked before the patch, so this morning's coverage, including our Java patch day post, called it unconfirmed. Upwind's analysis then reproduced the memory corruption in a lab.
Is Java4Shell confirmed?
Yes. The OpenJDK vulnerability advisory lists CVE-2026-114938 in the hotspot/compiler component against the 17, 21, 25 and 27 release lines. Oracle's November Critical Security Patch Update puts it at the top of its Java SE risk matrix and credits Quang Luong of Calif.io and Albert Yang.
So the highest-scoring Java flaw in Oracle's batch of 11 is Java4Shell. Oracle and OpenJDK rate it 8.1 on CVSS 3.1, with high attack complexity. Calif rates it 9.2 on CVSS 4.0. The gap is about how hard exploitation is, not about the bug.
How does the Base64 bug work?
On CPUs with AVX-512 VBMI, HotSpot replaces the Java code behind java.util.Base64 with a hand-written assembly routine once the C2 compiler has compiled the decoder. The routine came in with JDK-8268276 and was backported to Java 17 in 17.0.6. It decodes 64 characters at a time and hands the leftover 1 to 63 characters to a tail handler, L_finalBit. Simplified, that handler in generate_base64_decodeBlock() does this:
output_size = (length >> 2) * 3; // tail of 1 to 3 chars gives 0
// last char is '=': jump to L_padding
decrementq(output_size, 1); // 0 becomes -1 (0xFFFF...FFFF)
// second-to-last is also '=': -2
movq(output_mask, -1);
bzhiq(output_mask, output_mask, output_size); // the bug
evmovdqub(Address(dest, dp), k1, tmp, ...); // masked 64-byte store
Four things then go wrong in a row:
- Integer underflow. A tail of one to three characters ending in
=starts with an output size of 0. The padding step subtracts one or two, and the value wraps to -1 or -2. - The size limit disappears.
bzhireads only the lowest 8 bits of the count, here 255. Any count of 64 or more leaves the mask untouched, so it stays all ones. - No error is raised. Only zero to two real tail characters are loaded. The other lanes hold the filler character
a, which is valid Base64, so the error check passes. - Out-of-bounds write. The masked store writes all 64 bytes. Java sized the output array exactly, so the write runs past its end.
The returned byte count is then wrong and Java throws IllegalArgumentException, but the heap is already corrupted. For 64 valid characters plus a tail of =, A= or AB=, the decoder stores 64 bytes into a 50-byte array: 62 bytes of overflow, matching Calif's example. A tail of == or A== gives a 49-byte array and 63 bytes of overflow.
Can attackers control what gets written?
Barely. The rest of the spill is the decoded filler, a repeating 0x69 0xA6 0x9A pattern, and Calif puts attacker control at one byte plus four bits. What counts is where it lands: the header, class pointer or fields of the next object on the heap. Before Calif published, Upwind and Equixly both judged a JVM crash the likely outcome.
Calif's answer is heap shaping. It sprays pairs of arrays, lines one up behind the decoder's output and uses the overflow to inflate that array's length field. An array with a fake length can be written past its real end. A second corrupted array leaks heap memory, a step Calif calls "JavaBleed". Code execution is built from those two pieces.
Calif reports pre-authentication RCE in default setups of Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins and PingFederate, and RCE after login in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. A Java client connecting to a malicious TLS server can also be hit. Calif has published a trigger but is holding back the exploit chains until users have patched.
What does the OpenJDK patch change?
The fix is OpenJDK commit 5177a70b, titled "8393212: Base64 optimization improvements", by Tobias Hartmann with Albert Mingkun Yang and dated October 13, 2026. A bland title like that is typical for security fixes kept quiet until patch day. The whole patch is four lines in stubGenerator_x86_64.cpp:
__ 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);
Tails shorter than four characters now skip the AVX-512 handler and fall back to slower code and, in the end, Java's bounds-checked decode0(). The output size can no longer start at zero, so it cannot wrap. Longer tails were already safe.
The ARM version of the routine, added in the same original change, has no such tail logic, which is why ARM servers are safe. And with a four-line diff, anyone comparing old and new builds can find the bug in minutes. We checked the mainline commit only, not the 17, 21 and 25 backports.
Which systems are exposed to Java4Shell?
Three conditions have to line up:
- Java version: Java 17.0.6 or later, or any 21, 25 or 27 build before today's fixes. That covers Oracle Java SE and GraalVM as well as Temurin, Corretto, Zulu, Microsoft, Liberica, SapMachine and Red Hat builds. Oracle also lists its Java 8 performance build (8u511b33-perf). Standard Java 8 and 11 are not affected.
- CPU: x86-64 with AVX-512 VBMI: Intel Xeon from Ice Lake onward and AMD Zen 4 or newer, including AWS c6i, m6i, c7i, c7a and m7a instances. ARM servers such as Graviton and older Xeons are safe.
- Input path: attacker data must reach the basic or URL decoder in
java.util.Base64, not the MIME decoder. The routine must also be JIT-compiled first, which took about 10,000 decodes in Upwind's test, so busy servers are more exposed.
The input path is the easy part. HTTP Basic authentication decodes the Authorization header before it checks the password, and Spring Security, Tomcat and Jetty 12 all use the JDK decoder for it. Auth0's java-jwt decodes a token before verifying its signature. JJWT, Nimbus JOSE+JWT and Apache Commons Codec use their own decoders.
Which Java versions fix it?
Oracle's fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, released at 1 p.m. Pacific on November 17. The same update covers GraalVM. Restart every service after updating, because a running JVM keeps the old code.
Other OpenJDK vendors build from the same source, so their fixes are coming. As of this evening we had not seen fixed Temurin, Corretto, Zulu or Microsoft builds, and Upwind found the latest Temurin releases still vulnerable. Use the flags below until your vendor ships.
Java 17.0.11 and 21.0.3 are being shared as fixes, but they fixed an older, unrelated Base64 bug. And catching IllegalArgumentException does nothing, because it is thrown after the memory is overwritten.
How do you mitigate Java4Shell before patching?
If you cannot patch tonight, switch off the vulnerable routine with a JVM flag and restart:
-XX:-UseBASE64Intrinsicsdisables the accelerated Base64 decoder. Upwind found it stopped the overflow on every affected version it tested. Only Base64 decoding gets slower.-XX:UseAVX=2turns off all AVX-512 code. It works too, but slows cryptography, and a JVM on ARM refuses to start with it.
Skip -XX:DisableIntrinsic=_base64_decodeBlock, which is circulating online. It needs -XX:+UnlockDiagnosticVMOptions first, and pushing it fleet-wide through JAVA_TOOL_OPTIONS can stop services from starting. Confirm the flag with java -XX:-UseBASE64Intrinsics -XX:+PrintFlagsFinal -version | grep UseBASE64Intrinsics on the runtime your service uses.
How do you find vulnerable Java services?
- Check the CPU.
grep -c avx512vbmi /proc/cpuinfoprints a number above zero on affected hardware. - Check the runtime each process really uses.
jcmd <PID> VM.versionorreadlink -f /proc/<PID>/exeshows it. For containers, runjava -versioninside the image, not on the host. - Look for bundled runtimes. Jira, Confluence, Jenkins, Artifactory and Keycloak distributions often ship their own JDK.
- Rank by exposure. Internet-facing services with Basic auth or Auth0 java-jwt in front of login go first.
What signs of exploitation should you watch for?
Valid padded Base64 always has a length that is a multiple of four. A token of 32 or more Base64 characters that ends in = but breaks that rule is a strong signal, so start with Authorization headers. Equixly suggests a WAF rule rejecting Basic credentials that match ^Basic\s+(?:\S{4})*\S{0,2}=$. JWTs use no padding, so any JWT containing = can be rejected.
In logs, search for Input byte array has wrong 4-byte ending unit, which fired on every attempt in Upwind's tests. On hosts, watch for new hs_err_pid*.log crash files, worker restarts and Java processes spawning shells. A failed attempt can crash the JVM later, during garbage collection.
No exploitation in the wild had been reported as of November 17, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog.
Why does Java4Shell matter?
Log4Shell needed one logging library. Java4Shell sits in the JDK itself, so every framework that calls the standard decoder inherits it. Past incidents for affected vendors are on our Atlassian breach timeline, the Jenkins company page and the Oracle company page.