Java4Shell: One Base64 String Can Take Over Your Java Server (CVE-2026-114938)
Sixty-four letter As and one = sign. That’s the whole trigger. Feed that string to a warmed-up Java process on a modern Intel or AMD server, and the JVM writes 62 bytes past the end of an array.
Java code isn’t supposed to corrupt memory. Here, the JVM does it for you.
That’s Java4Shell.
Key Takeaways
- CVE-2026-114938 is a heap out-of-bounds write in HotSpot’s x86-64 Base64 intrinsic, reachable on CPUs with AVX-512 VBMI. Calif scores it 9.2 (CVSS 4.0); Oracle scores it 8.1 (CVSS 3.1).
- Affected: OpenJDK 17.0.6 and newer, plus every major downstream build (Temurin, Corretto, Zulu, Microsoft, Red Hat, Oracle Java SE, GraalVM).
- Calif demonstrated pre-auth RCE in Jenkins and Keycloak, and post-auth RCE in Elasticsearch, Kafka, and Solr.
- Fix: the November 17, 2026 Oracle CPU / OpenJDK release. Interim:
-XX:-UseBASE64Intrinsics. Restart every JVM after patching.
What Is Java4Shell and Why Does It Matter?
Java4Shell (CVE-2026-114938) is a memory-corruption flaw in OpenJDK’s hardware-accelerated Base64 decoder, disclosed on November 17, 2026 by Quang Luong of Calif (Calif, 2026). A remote attacker with no credentials can overwrite heap memory in any Java service that decodes attacker-supplied Base64 on an affected CPU.
Base64 is everywhere in Java applications. HTTP Basic auth headers, JWTs, SAML assertions, webhook payloads, API keys, file uploads. If your service accepts input from the network, there’s a good chance it decodes Base64 somewhere in the request path, often before authentication runs.
That’s what makes this different from a typical library bug. You can’t grep your code for one vulnerable dependency. The flaw sits in the JVM itself, under every framework you run.
CVE-2026-114938 is a heap out-of-bounds write in OpenJDK’s HotSpot x86-64 Base64 intrinsic. On CPUs supporting AVX-512 VBMI, a crafted padded input such as 64
Acharacters followed by=makes the JIT-compiled decoder write past the end of its output array, which Calif turned into pre-authentication remote code execution in Jenkins and Keycloak (Calif, 2026).
What Is the Root Cause of CVE-2026-114938?
The HotSpot Base64 intrinsic miscalculates the store mask for padded input tails, causing an out-of-bounds write (Calif, 2026). The bug only appears once the decoder has been JIT-compiled to the AVX-512 fast path.
Here’s how the decoder works on x86-64. It processes input in 256-byte blocks, then 64-byte blocks. For a tail under 64 bytes, it uses a masked store (evmovdqub) controlled by a 64-bit mask built from the expected output length.
The problem is padding. For tails like =, ==, X=, or XY=, the output length calculation underflows to -1 or -2. Feed a negative length into bzhiq, and the mask becomes all ones. All 64 bytes get written.
65-byte input: "AAAA...AAAA=" (64 x A + "=")
→ Java allocates a 50-byte result array
→ intrinsic starts writing at offset 48
→ masked store writes 64 bytes
→ 62 bytes land past the end of the array
The decoder does notice the input is invalid. It returns early, and Java throws IllegalArgumentException. But by then, neighbouring heap objects may already be corrupted. The exception gets caught and logged. The damage stays.
Which Systems Are Affected?
Any OpenJDK 17.0.6 or newer build running on x86-64 hardware with AVX-512 VBMI is affected (Calif, 2026). ARM64 hosts, including AWS Graviton and Apple Silicon, aren’t affected.
| Requirement | Detail |
|---|---|
| JDK version | OpenJDK 17.0.6 and newer (17, 21, 25, 27 lines) |
| Builds | Temurin, Corretto, Zulu, Liberica, SapMachine, Microsoft, Red Hat, Oracle Java SE, GraalVM for JDK |
| CPU | Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids; AMD Zen 4 and newer |
| Not affected | ARM64; older x86 CPUs without AVX-512 VBMI; Java 8 and 11 lines per TuxCare |
Patched builds: OpenJDK 21.0.13.1, 25.0.5.1, and 27.0.1.1, plus the November 2026 Critical Patch Update builds for Java 17 (TuxCare, 2026). The upstream fix is JDK-8393212, committed under the plain title “Base64 optimization improvements.”
Cloud matters here. Most current-generation x86 instance families on AWS, GCP, and Azure run on Ice Lake, Sapphire Rapids, or Zen 4 silicon. If you moved Java workloads to newer instances for price-performance, you probably moved them onto affected hardware.
How Does the Exploit Work?
Calif turned a fixed-value overwrite into full remote code execution through heap grooming, and kept the product-specific chains private (Calif, 2026). There’s no universal exploit, but the building blocks are public.
At a high level, the chain looks like this:
- Warm up the decoder. Send valid Base64 until the JIT compiles the vulnerable AVX-512 path.
- Overwrite a length field. Use the out-of-bounds write to enlarge a neighbouring buffer’s length, creating a “writer.”
- Build a reader. Turn the writer into a heap disclosure primitive Calif calls “JavaBleed,” which leaks tokens, private keys, and PII.
- Gain code execution. Shape the heap (G1 regions, TLABs) and, for remote targets, split requests over staged TCP delivery to control allocation order.
Calif reports pre-auth RCE in Jenkins, Keycloak, Atlassian Jira and Confluence, JFrog Artifactory, and PingFederate. Post-auth RCE was shown in Elasticsearch, Apache Kafka, Apache Solr, Gerrit, and Spinnaker. Discovery took about an hour with an AI coding agent, at a token cost under $200.
Client-side exposure exists too. A Java program that opens a TLS connection to a malicious server can be compromised.
Java4Shell’s exploit chain converts a fixed-value heap overwrite into an arbitrary read and write primitive by corrupting a neighbouring buffer’s length field, then reaches code execution through G1 heap grooming. Calif demonstrated pre-authentication RCE in Jenkins and Keycloak, and noted that nginx request buffering doesn’t stop its Elasticsearch chain (Calif, 2026).
Who Faces the Highest Risk?
Internet-facing Java services that decode Base64 before authentication carry the most risk (BleepingComputer, 2026). Identity providers and CI/CD systems top the list.
High-risk:
- Identity and SSO (Keycloak, PingFederate), they parse Base64 tokens and SAML before login completes
- CI/CD (Jenkins, Spinnaker, Gerrit), compromise leads straight to source code and deploy credentials
- Collaboration tools (Jira, Confluence, Artifactory), often exposed to partners or the internet
- Data platforms (Elasticsearch, Kafka, Solr), post-auth, but credentials leak easily inside networks
Lower-risk:
- Services on ARM64 hosts
- x86 hosts whose CPUs lack AVX-512 VBMI
- JVMs already started with
-XX:-UseBASE64Intrinsics
Is your WAF going to catch this? Probably not reliably. The trigger is short, valid-looking Base64 with padding, and it can sit inside any header or JSON field.
What Should You Do Right Now?
Priority 1, Patch the JDK. Update to your vendor’s November 17, 2026 build. Check Oracle’s November CPU, your OpenJDK distributor, or Red Hat bulletin RHSB-2026-018.
Priority 2, Restart every JVM. Updating the package on disk does nothing for a running process. Rebuild container images, redeploy, and confirm each process start time is after the patch.
Priority 3, Interim mitigation if you can’t patch today:
# Disable the hardware-accelerated Base64 intrinsic
JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"
# Alternative: disable AVX-512 entirely (x86-64 only;
# ARM JVMs don't recognize this flag and will fail to start)
JAVA_TOOL_OPTIONS="-XX:UseAVX=2"
Priority 4, Check your hardware exposure:
# All four flags present = CPU can hit the vulnerable path
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' \
| grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
# Confirm the running JDK version
java -version
Priority 5, Inventory hidden JVMs. Bundled runtimes inside appliances, vendor agents, and desktop tools all count. Don’t stop at the services your team deployed.
Indicators of Exploitation
Calif published no IOCs, and exploitation leaves little trace in application logs (Calif, 2026). Behavioural signals are your best bet.
Watch for:
- Bursts of
IllegalArgumentExceptionfromjava.util.Base64decoding, especially with short padded inputs - Unexplained JVM crashes (
hs_err_pid*.logfiles) on x86 hosts with AVX-512 - Many requests from one source with repeated valid Base64 followed by malformed padded strings (JIT warm-up then trigger)
- Java processes spawning shells or unexpected child processes
Kernel auditing for child processes:
# Log execve calls made by the Java service account
auditctl -a always,exit -F arch=b64 -S execve -F euid=$(id -u jenkins) -k java_exec
Frequently Asked Questions
Is this related to Log4Shell?
No. Log4Shell (2021) was a logic flaw in the Log4j library. Java4Shell is a memory-corruption bug inside the JVM’s JIT-compiled Base64 decoder. The name is a nod, not a link. Updating Log4j does nothing here, you need a patched JDK.
Does it work over the network?
Yes. Any service that decodes attacker-controlled Base64 can be reached remotely. Calif showed pre-authentication RCE in Jenkins and Keycloak. Whether your specific application is exploitable depends on its heap layout, but treat every internet-facing x86 Java service as exposed.
Are ARM servers safe?
ARM64 hosts aren’t affected, because the bug lives in the x86-64 AVX-512 code path. Patch them anyway. Mixed fleets change over time, and a container image built for both architectures will land on x86 eventually.
Why does Oracle’s score differ from Calif’s?
Oracle rated it 8.1 under CVSS 3.1, citing high attack complexity. Calif rated it 9.2 under CVSS 4.0. Both agree it needs no authentication. The practical answer is the same: patch on your critical-severity timeline.
Was this bug known before?
Yes. A user reported the crash to Adoptium in June 2026, and a fix was proposed in September but never merged. It was patched after Calif demonstrated exploitation, which shows how “just a crash” reports can hide RCE.
References
- Calif, Java4Shell: Write once, RCE everywhere
- OpenJDK Vulnerability Group, Advisory 2026-11-17
- Oracle, Critical Patch Update Advisory, November 2026
- BleepingComputer, Critical Java4Shell flaw allows RCE attacks on major Java applications
- TuxCare, Java4Shell CVE-2026-114938
- Adoptium Support, Issue #1480 (original crash report)
Related Intelligence
nginx2root: Five nginx Flaws and a Kernel Bug That Lead to Root (CVE-2026-123007)
Nov 19, 2026Copy Fail: The Linux Kernel Flaw That Hands Any Local User Root Access (CVE-2026-31431)
May 2, 2026When npm install Becomes a Weapon: Inside the axios Supply Chain Attack
Apr 19, 2026Secure Your Operations
Ready to identify critical vulnerabilities before threat actors do?
Request a Quote