Sixty-five characters of malformed Base64 are enough to make an unpatched Java server on the right hardware write past the end of a heap buffer. The bug sat in a public OpenJDK bug report for five months before anyone showed it could be turned into remote code execution.
In short: Java4Shell (CVE-2026-114938) is a heap memory corruption flaw in the hand-written x86-64 assembly that OpenJDK uses to decode Base64 fast on AVX-512 processors. It affects Java 17.0.6 and later on the 17, 21, 25 and 27 lines, Oracle and OpenJDK fixed it on 17 November 2026, and the fix is to update the Java runtime itself, including every copy bundled inside your products and containers.
- What is Java4Shell (CVE-2026-114938)?
- How does the Java4Shell bug work?
- Which applications did Calif exploit?
- Who is affected, and how do you check exposure?
- Timeline: why was a public bug patched so late?
- How severe is Java4Shell really?
- Is Java4Shell exploited in the wild?
- The catch: easy to crash, hard to weaponise
- How do you detect Java4Shell exploitation attempts?
- How do you fix Java4Shell? Mitigation in priority order
- How does Java4Shell compare to earlier cases?
- Open questions
- The bottom line
- Sources
What is Java4Shell (CVE-2026-114938)?
Java4Shell is a memory corruption vulnerability in the Base64 decoder of OpenJDK HotSpot, the standard Java virtual machine. Security firm Calif named and disclosed it on 17 November 2026, the same day Oracle published its November Critical Security Patch Update and the OpenJDK Vulnerability Group published its advisory. Oracle credits Quang Luong of Calif and Albert Yang.
Base64 is a way of writing binary data as plain text. Java servers decode it constantly: HTTP Basic authentication headers, JSON Web Tokens, SAML messages and file uploads all use it, and the Cloud Security Alliance (CSA) notes that servers usually decode these values before they decide whether a request is authenticated.
That is why the bug matters. An attacker does not need an account to send a Base64 value to a login page.
Why does a memory-safe language have a memory bug?
Java checks memory access for the code developers write, but much of the JVM underneath is C++ and assembly. To speed up hot code, the JIT (just-in-time) compiler called C2 swaps some library methods for intrinsics: small, hand-tuned machine code routines written for a specific CPU feature. Java4Shell lives in the intrinsic that decodes Base64 with AVX-512 VBMI, a set of vector instructions on recent Intel and AMD server chips.
Because the intrinsic only runs after JIT compilation on specific hardware, CSA points out that it does not show up in a source review of the Java libraries, and software composition analysis tools that scan application dependencies miss it.
How does the Java4Shell bug work?
According to Calif’s write-up, the bug is in how the intrinsic handles the last few characters of input, the “tail”. It computes how many output bytes remain, then subtracts one for each trailing = padding character. For certain malformed tails, the remaining length is already zero, so the subtraction makes it negative.
That negative number is fed to an instruction that builds a 64-bit write mask. JFrog’s analysis explains that the instruction only reads the low 8 bits, so -1 becomes 255, and the resulting mask is all ones. A store that should write nothing writes a full 64 bytes.
In Calif’s example, a 65-character input (64 valid characters plus one =) makes Java allocate a 50-byte output array. The faulty store starts at byte 48, so 2 bytes land inside the array and 62 land in whatever object sits next on the heap. On OpenJDK 17 the trigger needs a longer input. Java then throws an IllegalArgumentException, which is the correct reaction, just too late.
From a fixed-byte overwrite to code execution
The overflow is a constrained primitive. Calif says the attacker fully controls only the first byte, and bytes 48 to 63 are always the value 0x9a. What the attacker controls is where the corruption lands.
Calif’s conceptual approach, described at a high level:
- Groom the heap so a second array sits right after the decoder’s output buffer.
- Use the overflow to enlarge that array’s length field, turning a fixed write into a chosen-value write.
- Enlarge a third array whose contents are returned to the attacker, which leaks heap memory. Calif calls this stage “JavaBleed”, after Heartbleed.
- Escalate to arbitrary writes that reach the JVM’s code cache.
Step 3 alone is serious. Calif says the leaked heap can hold personal data, private keys, tokens and other secrets, even when code execution is never reached.
Which applications did Calif exploit?
Calif reports remote code execution in widely deployed Java applications in their default configurations, and says the list is not exhaustive.
| Access needed | Applications Calif says it exploited |
|---|---|
| None (pre-auth RCE) | Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederate |
| Logged-in user (post-auth RCE) | Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker |
| Sample apps | Applications built on Apache Struts and Spring Boot |
Calif also says researcher samczsun shared a client-side exploit: a Java program that opens a TLS connection to a malicious server can be compromised even if it listens on no port. Calif has not published how that path reaches the decoder, so treat it as reported, not independently confirmed.
Calif is holding back its application-specific exploits until users have had time to upgrade.
Who is affected, and how do you check exposure?
A host is exposed only when three conditions hold at once, as JFrog summarises them.
Condition 1: an affected Java runtime
| Java line | Affected (Oracle builds) | Fixed build |
|---|---|---|
| 17 | 17.0.6 through 17.0.21.0.3 | 17.0.21.1 |
| 21 | up to 21.0.13.0.3 | 21.0.13.1 |
| 25 | up to 25.0.5.0.3 | 25.0.5.1 |
| 27 | up to 27.0.1.0.3 | 27.0.1.1 |
| 8 Enterprise Performance Pack | 8u511b33-perf | 8u513-perf |
Distributions built from OpenJDK are affected too: Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK and Oracle GraalVM. Standard Java 8 and 11 are not affected, and JFrog says OpenJ9 is not either. Non-LTS branches 18 to 20, 22 to 24 and 26 get no fix.
Condition 2: the right CPU
The vulnerable code runs only on x86-64 processors with AVX-512 VBMI. Calif lists Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD Zen 4 or newer. On Linux, the CPU flags line must contain all four of avx512f, avx512bw, avx512vbmi and bmi2. ARM64, including AWS Graviton and Apple Silicon, is not affected.
CSA highlights the awkward consequence: the same container image can be vulnerable on one Kubernetes node and safe on the next, so a “safe” result can flip after an instance resize or reschedule.
Condition 3: untrusted Base64 reaches the decoder
Oracle says the flaw is only exploitable when an application passes untrusted data to the affected APIs. In practice that bar is low, because authentication headers and tokens are Base64.
Timeline: why was a public bug patched so late?
Java4Shell was not secret before November. Calif’s own disclosure timeline shows that a user, sundarms, hit the crash in the wild and opened an Adoptium support issue on 9 June 2026. In September the same user posted a crash reproducer, and an OpenJDK contributor identified the root cause and proposed a fix. That pull request was closed without being merged.
On 24 October, Calif’s Quang Luong asked OpenAI’s Codex coding agent to audit the JVM with a focus on x86-64 intrinsics. Calif says Codex found the bug within an hour, that its transcripts show it did not look up existing reports, and that the first working exploit took two more hours for under $200 in tokens. Calif reported it to Oracle the same day with a post-auth Elasticsearch exploit, then sent pre-auth Jenkins and Keycloak exploits on 31 October.
Oracle fixed the bug and released the patch at 1 p.m. Pacific on 17 November. Tenable reports that Calif announced the flaw that morning because details had leaked ahead of the fix. CISA and the Canadian Centre for Cyber Security (advisory AL26-029) issued alerts the same day.
This is the second time recently that an AI-assisted team turned an overlooked bug into a working exploit quickly; see how Google’s exploit_agent turns patches into exploits and how the Cairn agents found a zero-day on their own.
How severe is Java4Shell really?
Scores disagree more than usual, and CSA attributes that to different scoring versions and different views of attack complexity rather than disagreement about the flaw.
Oracle’s 8.1 rates attack complexity as high. Amazon’s 8.8 reflects a crash for unauthenticated users and code execution only for authenticated low-privilege users in certain environments, according to CSA. Calif’s 9.2 uses CVSS 4.0 and an unauthenticated network vector.
Is Java4Shell exploited in the wild?
Not confirmed. Tenable reports that GreyNoise saw exploitation attempts from 18 November but had not confirmed any successful exploitation, and also saw scanning from a public version-checking tool. When this article was written, CVE-2026-114938 was absent from CISA’s KEV catalog, version 2026.11.27.
Private exploits do exist, according to their authors. VulnCheck says it has a working exploit for customers, Immersive’s Kevin Breen says he built one, and Wiz says its AI harness produced a proof of concept within two hours. None had been publicly demonstrated or independently verified as of CSA’s 19 November note. CSA assesses that weaponised exploits for common targets are likely to appear, and labels that an inference.
The catch: easy to crash, hard to weaponise
Java4Shell is not a point-and-shoot bug, and the honest picture has two halves.
Denial of service is easy. CSA cites Blackpoint Cyber crashing a test Spring Boot app with about 28,300 unauthenticated login requests in roughly 20 seconds, and Upwind reproducing a crash on an AWS Ice Lake host.
Code execution is hard. Calif says each chain needs a decoder route, a live writer, a way to read results back, a heap layout and an application action, so every target needs a bespoke profile. Its attacks relied on low, stable round-trip times, run from the same cloud region as the target. VulnCheck says it does not expect wide, easy exploitation.
OX Security, as cited by CSA, estimates that under 0.12% of JVMs are realistic RCE targets and about 0.8% are remotely crashable, and admits those numbers rest on assumptions. A small share of a huge install base, concentrated in identity and CI/CD systems, is still a lot of valuable targets.
How do you detect Java4Shell exploitation attempts?
There is no single reliable indicator, and absence of signals does not prove safety.
Behaviours and log sources
- Reverse proxy and web server logs: Upwind, cited by CSA, suggests looking for Base64 tokens of 32 or more characters that end in = and whose length is not a multiple of four, especially in Authorization headers.
- Application logs: bursts of IllegalArgumentException from java.util.Base64$Decoder.
- JVM crash artefacts: unexplained hs_err_pid crash files and restart loops on exposed Java services. Treat clusters of crashes as possible exploitation attempts.
- Repeat traffic: many near-identical malformed requests from the same source, since Calif’s chains need warm-up and retries.
ATT&CK techniques
The relevant technique is T1190, Exploit Public-Facing Application. For the client-side scenario Calif describes, watch Java processes that open unexpected outbound TLS connections. If memory disclosure is suspected, follow-on use of stolen tokens and keys falls under credential access and valid accounts techniques.
How do you fix Java4Shell? Mitigation in priority order
- Inventory every Java runtime that handles untrusted input, recording vendor and full build, including JREs bundled inside commercial products, appliances and container images. A system JDK update does not touch bundled copies.
- Patch internet-facing identity providers first (Keycloak, PingFederate, other Java SSO), then source control, CI/CD and artifact systems (Jenkins, Gerrit, Artifactory, Atlassian). Keycloak’s updated 26.8 images use Red Hat OpenJDK 21.0.13.1.
- Restart and redeploy. A fixed runtime on disk does nothing for a JVM that is still running the old one. Rebuild container images.
- Use the interim flag where no fix exists yet: -XX:-UseBASE64Intrinsics disables only the vulnerable fast path. Upwind warns that a different flag, DisableIntrinsic for the decode block alone, stops Java from starting, so test first.
- Do not apply -XX:UseAVX=2 to mixed fleets blindly: it works on x86-64 but Java on ARM fails to start with it.
- Rotate secrets on exposed, unpatched identity and CI/CD hosts: signing keys, client secrets and deployment credentials, because of the memory disclosure primitive.
- Put admin and login interfaces behind a VPN or identity-aware proxy where possible, and ask each vendor when its bundled runtime will be fixed.
How does Java4Shell compare to earlier cases?
Calif frames Java4Shell as part of a pattern from its own recent work. Here is how it lines up with the cases Calif and Tenable reference.
| Case | Where the bug lived | What stands out |
|---|---|---|
| Java4Shell (2026) | OpenJDK AVX-512 Base64 intrinsic | Public crash report since June, patched only after RCE was shown |
| PHP2Shell (Calif, 2026) | PHP | Calif says it was also already reported and patched only after exploitation was demonstrated |
| Squidbleed (Calif, 2026) | Squid proxy FTP module | Calif calls it an older Heartbleed cousin, present since 1997 |
| Older Java KEV entries | Oracle JRE and Java SE | Tenable counts 13 Java entries in KEV, six used in ransomware |
The common thread is code few people need, such as an FTP module or a Base64 fast path, shipping to everyone. Calif argues the security answer is removing it. For other Java-side risk in this month’s news, see Apache Roller CVE-2026-129448, a Java deserialization flaw in CISA’s KEV list.
Open questions
- The client-side TLS path. Calif reports it but has not explained how it reaches the decoder.
- Real-world reach. Exposure depends on CPU, runtime and application code path together, and no source has a reliable count of exposed servers.
- Severity. Oracle says 8.1 and high complexity; Red Hat’s preliminary score is 9.8. They describe the same bug from different assumptions.
- The June report. CSA notes that available reporting does not establish whether the September pull request concerned exactly the same root cause.
- Private exploits. VulnCheck, Immersive and Wiz describe RCE exploits nobody outside those firms has verified.
The bottom line
Java4Shell is a real memory corruption bug in the JVM itself, triggered by input every Java login page accepts, but it only bites on AVX-512 x86-64 hosts running Java 17.0.6 or later. Crashing an exposed service is easy and code execution is hard, which makes this a fast-patch job, not a panic. Update the runtime, including every bundled copy, restart, and rotate secrets on identity and CI/CD servers that were exposed while unpatched.
Sources
- Calif: Java4Shell, Write once, RCE everywhere (write-up and disclosure timeline)
- Tenable: Java4Shell (CVE-2026-114938) frequently asked questions
- Cloud Security Alliance: Java4Shell research note (19 November 2026)
- JFrog Security Research: Java4Shell, what we know
- Cisco Talos blog: CVE-2026-114938 threat advisory listing
- CISA Known Exploited Vulnerabilities catalog (JSON feed, version 2026.11.27)
This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.