Java4Shell (CVE-2026-114938): is your Java server affected?
Java4Shell is the nickname for CVE-2026-114938, a memory-corruption bug in the Base64 decoder that OpenJDK uses on x86-64 machines with AVX-512 VBMI. The security group Calif says a 65-character string, 64 letter A's fol
Java4Shell is the nickname for CVE-2026-114938, a memory-corruption bug in the Base64 decoder that OpenJDK uses on x86-64 machines with AVX-512 VBMI. The security group Calif says a 65-character string, 64 letter A's followed by an equals sign, makes the decoder write 62 bytes past the end of a 50-byte array. OpenJDK and Oracle published fixes on November 17. If you run Java 17 or newer, the question is whether any of your servers can reach the broken code path, and that takes about four checks.
TL;DR
- Calif reports that OpenJDK's AVX-512 Base64 decoder writes 64 bytes into a 50-byte array for a 65-character padded input, so 62 bytes land past the end. Java rejects the input afterwards, which is too late.
- Scope: OpenJDK 17.0.6 and newer on x86-64 CPUs with AVX-512 VBMI (Intel Ice Lake or later, AMD Zen 4 or later). ARM64 is not affected. Standard Java 8 and 11 are not on this CVE.
- OpenJDK and Oracle list it at CVSS 3.1 8.1; Calif scores it 9.2 on CVSS 4.0. Fixed builds exist from Oracle and Amazon Corretto, and Temurin is releasing as testing finishes.
- Calif says it reached code execution in eleven products. Those are Calif's own tests, the recipes are withheld, and Calif says there is no universal exploit.
- The mitigation that works everywhere is
-XX:-UseBASE64Intrinsics. When I checked on November 18, the CVE was not on CISA's Known Exploited Vulnerabilities list.
What is Java4Shell (CVE-2026-114938)?
Base64 packs three bytes into four text characters. It shows up in login headers, file uploads and network messages, so almost every Java server decodes it somewhere. To decode it faster, HotSpot, the JVM inside OpenJDK, can swap in a hand-written assembly routine once a decode call site has been compiled by C2, the optimizing JIT compiler. The routine uses AVX-512 VBMI instructions to process 64 bytes at a time.
Calif, a security research group, found the bug in that routine. Its write-up credits Quang Luong, who says he told the Codex coding agent to audit the JIT compiler, intrinsics, widely used APIs and cryptography. Most of what came back was junk, he says, and then it flagged the Base64 decoder. Calif says it took one hour to find the bug and two more hours to build the first working exploit, for under $200 in tokens. I have not verified any of that; it is Calif's account. Calif is also the team behind PHP2Shell, which I covered on October 22.
How does the Base64 overflow work?
Take the published trigger: 64 letter A's followed by one equals sign.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
(On older OpenJDK 17 builds Calif says the trigger is 128 A's plus the equals sign.) Sixty-four A's decode to 48 bytes. With the padding character, Java reserves a 50-byte result array for the 65-character input. The assembly handles the final tail with one 64-byte store and a mask that says which bytes to write. Calif's pseudocode shows where it goes wrong:
output_len := (input_length / 4) * 3
if input[input_length - 1] == '=':
output_len -= 1
output_mask := bzhiq(-1, output_len)
For a one-character tail the first line gives zero, the padding branch subtracts one, and the length becomes minus one. The mask instruction bzhiq does not clip an index of 64 or more, so the mask comes out as all ones and the store writes all 64 bytes. The store starts at offset 48 of a 50-byte array, so 62 bytes land past the end, on whatever object the allocator placed next door. Only then does Java notice the input is malformed and throw IllegalArgumentException. The error is correct and it is late.
The fix in public OpenJDK is small. The November security branch (pull request 33936, CSPU26_11) contains a four line change in stubGenerator_x86_64.cpp, committed under the title "Base64 optimization improvements". It adds a check that sends padded tails shorter than four characters to the Java code instead:
+ // A padded Base64 tail shorter than one complete block is handled by Java.
+ __ cmpl(length, 4);
+ __ jcc(Assembler::less, L_bruteForce);
OpenJDK's advisory does not name this commit; I tie it to the CVE by its place in the security branch and by how well it matches Calif's description.
From a fixed spill to code execution: what Calif claims
The spill is mostly a constant pattern, and only its landing position is controllable. Calif says it aims the spill at the length field of a neighboring array, which turns the fixed write into a bounded, chosen-value write. A second array whose length is corrupted and whose data is copied into the response becomes a heap read, which Calif compares to Heartbleed. From there Calif describes warming up the decoder until the JIT selects the fast path, an optional rehearsal round, the trigger, disclosure, repair of damaged objects and an application-specific final step.
Calif says its initial testing reached code execution in default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate without a login, and in Kafka brokers, Solr, Elasticsearch, Gerrit and Spinnaker after one. It also lists sample Struts and Spring Boot applications, and a client-side route in which a Java program opens a TLS connection to a malicious server. These are Calif's own results. The product recipes stay private until people have had time to patch, and I found no product advisory in the vendor pages I checked that confirms them.
Calif is open about the limits. There is no universal exploit; every target needs its own profile: a route to the decoder, a live writer, a way to read the result back, a heap layout and an application action. The attack is sensitive to network jitter, and Calif says it rented a server in the same cloud region as its target to reduce it. Some chains need request streaming, so a proxy that buffers the whole request body, such as nginx by default, removes their timing. Calif adds that this is not a general mitigation: Elasticsearch runs from a single complete request, so buffering does not stop that chain.
What is confirmed, and by whom?
- Vendors. OpenJDK's advisory dated November 17 lists CVE-2026-114938 under hotspot/compiler at CVSS 3.1 8.1, affecting 17, 21, 25 and 27. Oracle's November Critical Security Patch Update lists the same score and credits Quang Luong of Calif.io. Oracle JDK 17.0.21.1 has a release date of November 17.
- Distributions. Amazon's Linux Security Center shows Corretto 17, 21 and 25 packages as fixed on November 17. Adoptium says Temurin builds with the fix are being published as testing completes. Red Hat's bulletin says it is expediting fixes and that JVMs on ARM64, or on x86-64 CPUs without AVX-512 VBMI, are not known to be affected.
- Government. CISA's alert of November 17 urges immediate patching and suggests validating Base64 input at the application boundary and limiting unauthenticated access as temporary controls.
- Exploitation. The CVE was not in CISA's Known Exploited Vulnerabilities catalog (version 2026.11.17) when I checked on November 18. That says nothing about the future. The security firm Hadrian says it crashed Spring Security and Tomcat login checks on a Temurin 17 build in a lab, and reached code execution in a lab service that decodes request bodies; that is Hadrian's claim, and it says reliable code execution is very hard to reproduce.
Which of your servers can run the broken code?
Four conditions have to line up for a JVM to be in scope.
- An x86-64 chip with AVX-512 VBMI. Calif names Intel Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD Zen 4 or newer. On Linux, Calif's check prints the relevant CPU flags:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
All four flags must appear. A virtual machine sees the CPU features its hypervisor exposes, so run the check inside the guest that runs the JVM.
- A Java build in range. OpenJDK 17.0.6 and newer, which means Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat OpenJDK and Oracle builds that have not yet taken the fix. Standard Java 8 and 11 are not on this CVE; Oracle also lists its Java 8 performance build.
- A warmed-up decoder. The C2 compiler selects the routine only after the Base64 call site has been compiled, so a freshly started JVM is still on the Java implementation. Semgrep's detection README says AWS Lambda's Java bootstrap limits the JIT in a way that keeps the intrinsic unused by default; I have not verified that myself, so read it before relying on it.
- Input an attacker can reach. The vulnerable decoder has to receive attacker-controlled data, through an authentication header, an upload, a token or a message.
If any of the four is missing, the JVM is out of scope for this bug. You should still update, because the checks above depend on hardware that cloud providers and migrations change.
How do I fix or mitigate Java4Shell?
| Option | Works on | Notes |
|---|---|---|
| Update to the fixed build for your Java line | everything | Oracle JDK 17.0.21.1 shipped on November 17; check your vendor for the matching Corretto, Temurin or distribution build |
-XX:-UseBASE64Intrinsics |
every architecture | disables the hardware Base64 routine; Aikido notes that programs decoding a lot of Base64 may run slower |
-XX:UseAVX=2 |
x86-64 only | disables AVX-512; OpenJDK on ARM does not recognize the flag and will fail to start |
| Rebuild container images | containers | patching the host leaves the JDK inside an old image as it was |
Calif and Adoptium both recommend -XX:-UseBASE64Intrinsics as the interim control.
What Calif says we should delete
Calif's closing argument is that the fast decoder helps programs that decode enormous amounts of Base64, while everyone else carried the assembly too. It calls the cleanup vibe-uncoding, and the phrase is theirs; Calif notes that an apparently unused feature can have hidden dependencies.
Verdict: SHIP IT
I stamped the patch SHIP IT. It is small, public and already built by the main vendors, and the one flag works everywhere. Calif's code execution claims stay Calif's until someone else shows them, so update without panic and check which machines are actually in scope.
FAQ
Is Java4Shell exploited in the wild?
I found no source saying so. CISA urged patching, and the CVE was not on its Known Exploited Vulnerabilities list when I checked on November 18.
Does Java4Shell affect ARM and Graviton servers?
Calif, Red Hat and Amazon say ARM64 is not affected, because the vulnerable routine is x86-64 AVX-512 code. Do not set -XX:UseAVX=2 on ARM; the JVM will refuse to start.
Does it affect Java 8 and Java 11?
OpenJDK's advisory marks Java 17, 21, 25 and 27. Red Hat and Adoptium say Java 8 and 11 are not affected. Oracle separately lists its Java 8 performance build.
Is the 65-character string enough to take over a server?
Calif says the string only causes the overwrite. Turning it into code execution needed a separate, bespoke recipe for each product, which Calif has not published.
Sources
- Calif, Java4Shell write-up: https://calif.io/java4shell
- OpenJDK vulnerability advisory 2026/11/17: https://openjdk.org/groups/vulnerability/advisories/2026-11-17
- Oracle Critical Security Patch Update, November 2026: https://www.oracle.com/security-alerts/cspunov2026.html
- Oracle JDK 17.0.21.1 release notes: https://www.oracle.com/java/technologies/javase/17-0-21-1-relnotes.html
- OpenJDK pull request 33936 (CSPU26_11): https://github.com/openjdk/jdk/pull/33936
- OpenJDK commit 5177a70: https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b
- CISA alert: https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching
- Red Hat bulletin RHSB-2026-018: https://access.redhat.com/security/vulnerabilities/RHSB-2026-018
- Adoptium guidance for Temurin: https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell
- Amazon Linux Security Center: https://explore.alas.aws.amazon.com/CVE-2026-114938.html
- Corretto 25.0.5.1.2 changelog: https://github.com/corretto/corretto-25/blob/25.0.5.1.2/CHANGELOG.md
- Hadrian write-up: https://hadrian.io/vulnerability-alerts/oracle-critical-security-patch-update-java-17-rce-claims
- Semgrep detection scripts: https://github.com/semgrep/detection-scripts/tree/main/CVE-2026-114938
- Hacker News discussion: https://news.ycombinator.com/item?id=50538240
This article expands on an episode of **The Daily Diff, a five-minute daily video on what shipped and what broke in tech.
Watch the episode Β· Subscribe on YouTube Β· the written diff lands in your inbox every morning at thedailydiff.dev.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.