Oracle and the OpenJDK project have patched Java4Shell (CVE-2026-114938), a memory corruption flaw in Java’s Base64 decoder that Calif used to take over Jira, Confluence, Jenkins and Keycloak servers without logging in.
The bug sits in hand-written x86-64 assembly that the HotSpot JVM uses to speed up Base64 decoding with AVX-512 VBMI instructions. According to Calif’s write-up, a string of 64 letter A’s followed by a single = makes the decoder write 62 bytes past the end of its output array. That corrupts neighbouring objects on the Java heap before Java rejects the input as invalid.
Java4Shell affects OpenJDK 17.0.6 and later, including Java 21, 25 and 27, plus Oracle’s Java 8 Enterprise Performance Pack. It needs an x86-64 processor with AVX-512 VBMI support, such as Intel Xeon from Ice Lake onward or AMD EPYC and Ryzen from Zen 4 onward. ARM64 servers are not affected. Calif rates the flaw 9.2 under CVSS 4.0, while the OpenJDK advisory scores it 8.1 under CVSS 3.1.
As of 7:30 a.m. IST on November 18, Oracle and Amazon have shipped fixed builds for Java 17, 21, 25 and 27. Eclipse Temurin, Azul Zulu, Microsoft, Red Hat and the Linux distributions have not yet published fixes. No in-the-wild attacks have been reported, and Calif is withholding its product exploits until users have had time to upgrade.
What Is Java4Shell (CVE-2026-114938)?
Java4Shell is a heap out-of-bounds write in the Java runtime itself, not in an application or library. Java is marketed as memory-safe because the JVM checks every array access. But parts of the JVM are written in C, C++ and assembly for speed and that low-level code gets no such checks.
Base64 turns binary data into text so it can travel through channels built for text. Every three bytes become four characters, and = signs pad the final block. Java servers decode Base64 constantly: in HTTP Basic authentication headers, JSON Web Tokens, SAML assertions, file uploads and API messages. Much of that decoding happens before the user has logged in, which is what makes Java4Shell a pre-authentication bug.
Security firm Calif found the flaw and reported it to Oracle. Calif went public on November 17 after the vulnerability leaked ahead of the coordinated disclosure, and published its full write-up once Oracle’s patch went out at 1 p.m. Pacific (2:30 a.m. IST). Oracle credits Calif researchers Albert Yang and Quang Luong in its November 2026 Critical Security Patch Update.
How the Java4Shell Bug Works
When a Java method runs often enough, the JVM’s C2 compiler turns it into native code. For some hot methods, including Base64 decoding, HotSpot goes further and swaps in an “intrinsic”, a hand-tuned routine that uses special CPU instructions to process many bytes at once. On x86-64 chips with AVX-512 VBMI, the Base64 intrinsic decodes input in 256-byte and then 64-byte blocks, and uses a bit mask to decide exactly which bytes it may write.
The bug is in how that routine handles the last few characters. For a leftover tail of just =, the code first calculates an output length of zero, then subtracts one for the padding character. The length underflows to minus one, and the mask calculation treats that as “write everything”. For Calif’s 65-character input, Java allocates a 50-byte result array, but the intrinsic writes a full 64 bytes. The extra 62 bytes land past the end of the array. That makes Java4Shell an integer underflow (CWE-191) that leads to an out-of-bounds write.
Java then rejects the malformed input, but the damage is done by the time the error is raised. Calif notes that older Java 17 builds need a longer trigger, 128 A’s followed by =, because their version of the routine uses different block sizes.
The affected range starts exactly where the AVX-512 Base64 decoder arrived in Java 17. The optimization, JDK-8268276, was written for JDK 18 and backported to Java 17 as JDK-8296735 in the 17.0.6 update, according to Oracle’s JDK 17 release notes. Oracle’s Java 8 Enterprise Performance Pack received the same optimization, according to the 8u371-perf release notes, which explains why it is the only Java 8 build on the affected list.
Calif Turned a Fixed Overwrite Into Full RCE
On its own, the overflow writes fixed bytes that the attacker doesn’t choose, which Calif’s researchers initially considered close to unexploitable. Using heap grooming, which means sending requests that arrange objects in memory in a predictable order, Calif turned the overwrite into a controlled write. It also built a way to leak Java heap memory back to the attacker, a Heartbleed-style primitive the researchers call “JavaBleed”. With both pieces, Calif reached remote code execution.
Calif says it achieved pre-auth RCE against default configurations of Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate. It also demonstrated post-auth RCE, which requires a login first, against Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit and Spinnaker. Calif calls both lists non-exhaustive and says it also exploited sample apps built on Apache Struts and Spring Boot.
The bug also works in reverse. Researcher samczsun shared a client-side exploit with Calif, in which a Java program that opens a TLS connection to a malicious server can be compromised even if it runs no network service of its own.
There is no one-click exploit. Calif says each target needs its own profile: a route to the decoder, a suitable heap layout, a way to read data back and an application action to hijack. Some current grooming profiles rely on streaming partial request bodies, which a proxy that buffers the full body, as nginx does by default, can disrupt. Calif warns this is not a general mitigation: its Elasticsearch chain works from one complete request, and WebSocket traffic bypasses request buffering.
Which Code Paths Reach the Vulnerable Decoder
Cloud security firm Upwind reproduced Java4Shell on an AWS c6i instance (Intel Ice Lake). It found that HTTP Basic authentication in Spring Security, Tomcat and Jetty 12, and Auth0’s widely used java-jwt library, all pass attacker-supplied tokens to the vulnerable decoder before any credentials are checked. That makes ordinary login endpoints and JWT-protected APIs the first places to look in custom applications.
Upwind confirmed Eclipse Temurin 17.0.6, 17.0.21, 21.0.13 and 25.0.5 as vulnerable, and Java 11.0.33 and 17.0.5 as unaffected. With an exactly sized output buffer, the overflow corrupted the next object in memory in 97% of rounds and eventually crashed the JVM. Both of Calif’s mitigation flags blocked the bug on every affected version Upwind tested.
Which Cloud Servers Are Affected by Java4Shell
Because the bug needs AVX-512 VBMI, your cloud instance type largely decides exposure. Calif lists Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids and AMD Zen 4 or newer, as meeting the hardware requirement. Mapping that list to the processors each cloud family uses gives a quick first-pass triage. Run the CPU check on each host to confirm, because some families run on more than one processor generation.
On AWS, Intel families from the sixth generation (such as c6i, m6i and r6i), seventh-generation Intel (c7i, m7i, r7i) and AMD Zen 4 families (c7a, m7a, r7a) are in scope. Older Skylake and Cascade Lake families such as c5 and m5 support AVX-512 but lack VBMI, and AMD Zen 3 families such as c6a and m6a have no AVX-512, so neither runs the vulnerable code. Graviton instances are ARM-based and not affected.
On Azure, Ice Lake-based Dv5 and Ev5 series and Zen 4-based Dasv6 and Easv6 series are in scope, while Zen 3-based Dasv5 and ARM-based Dpsv5 and Dpsv6 series are not. On Google Cloud, C3, C3D and C4 machines are in scope; N2 depends on whether the VM landed on Cascade Lake or Ice Lake, and ARM-based T2A and C4A are not affected.
Which Java Versions Are Affected, and Which Builds Fix Java4Shell
Java4Shell affects every OpenJDK-based distribution built from 17.0.6 or later, Calif says. That covers Oracle Java SE, Oracle OpenJDK, Oracle GraalVM for JDK, Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine and Red Hat OpenJDK. Standard Java 8 and Java 11 builds, and Java 17.0.0 through 17.0.5, are not affected.
| Product | Vulnerable builds | Fixed build (as of Nov 18, 7:30 a.m. IST) |
|---|---|---|
| Oracle Java SE 17 | 17.0.6 to 17.0.21.0.3 | 17.0.21.1 |
| Oracle Java SE 21 | 21.0.13.0.3 and earlier | 21.0.13.1 |
| Oracle Java SE 25 | 25.0.5.0.3 and earlier | 25.0.5.1 |
| Oracle Java SE 27 | 27.0.1.0.3 and earlier | 27.0.1.1 |
| Oracle Java SE 8 Enterprise Performance Pack | 8u511b33-perf | 8u513-perf |
| Amazon Corretto 17 | 17.0.21.0.11 and earlier | 17.0.21.1.2 |
| Amazon Corretto 21 | 21.0.13.0.11 and earlier | 21.0.13.1.2 |
| Amazon Corretto 25 | 25.0.5.0.10 and earlier | 25.0.5.1.2 |
| Amazon Corretto 27 | 27.0.1.0.11 and earlier | 27.0.1.1.4 |
| Eclipse Temurin | 17.0.21+9, 21.0.13+9, 25.0.5+8 and earlier | Not yet released |
| Microsoft Build of OpenJDK | 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3 and earlier | Not yet released |
| Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat | 17.0.6 and later, 21, 25, 27 | Not yet released |
| Ubuntu, Debian, SUSE openjdk packages | 17.0.6 and later, 21, 25 | Not yet released |
| Standard Java 8, Java 11, Java 17.0.0 to 17.0.5 | Not affected | No action for Java4Shell |
Oracle’s fixed builds come from Qualys’s summary of the vendor releases. Amazon’s Corretto builds for all four lines are listed by Aikido, and Field Effect reports Corretto 17.0.21.1.2 shipped on November 17. Microsoft’s latest published builds, 17.0.21.0.3, 21.0.13.0.3 and 25.0.5.0.3, are the vulnerable October releases. Temurin’s latest is still the October 17.0.21+9 release, which Upwind confirmed as vulnerable.
The upstream fix is a four-line change under OpenJDK bug JDK-8393212, titled “Base64 optimization improvements”, according to Endor Labs. It is in OpenJDK 27.0.1.1 and mainline. As of November 17, it had not yet reached the public jdk17u, jdk21u or jdk25u repositories that most downstream vendors build from, which explains the lag. Look for JDK-8393212 in your vendor’s release notes. South Korea’s AhnLab advises users of the upstream OpenJDK builds to move to 17.0.21.1+4 on Java 17 and 21.0.13.1+4 on Java 21. Cyber Kendra will add each vendor’s fixed build to this table as it ships.
Why Java4Shell Is Rated 9.2 and 8.1
Both scores describe the same bug. The OpenJDK advisory lists CVE-2026-114938 in the hotspot/compiler component with a CVSS 3.1 score of 8.1, marking it as network-reachable with no privileges or user interaction but with high attack complexity. That complexity reflects the heap grooming and per-application tuning that exploitation requires. Calif’s 9.2 rating uses CVSS 4.0, which weighs those conditions differently.
Not every vendor reads the impact the same way. Amazon’s Linux security advisory says that, depending on the deployment, exploitation could crash the JVM for unauthenticated attackers, or allow code execution by an authenticated low-privileged user in certain application environments. Datadog Security Labs likewise says denial of service is the more readily achievable impact, and that reliable RCE requires exploitation work tailored to the application and JVM. Calif’s demonstrations show pre-auth RCE against default installs of six products, so the difference comes down to how much per-target effort an attacker invests. Patch priority should not change.
Java4Shell was also the top-scoring flaw in Oracle’s November Java update. The 8.1 maximum that Oracle disclosed in its pre-release notice turned out to be this bug.
Is Java4Shell Being Exploited? Is There a Public PoC?
As of November 18, no vendor, government agency, or security firm has reported in-the-wild exploitation of Java4Shell, and CISA has not added it to its Known Exploited Vulnerabilities catalog. That may not last. Calif has published the root cause, the trigger string and its general exploitation technique and is holding back only the product-specific chains, which it says it will release later.
Others are already building exploits. Wiz says its AI research tool produced a proof of concept within two hours, before full disclosure. Wiz expects attackers to focus first on widely deployed packaged apps such as Jenkins, Confluence and Tomcat, whose builds and memory layouts are the same everywhere.
Calif’s write-up includes a safe, self-contained Java test program. It warms up the decoder until the vulnerable intrinsic kicks in, decodes the malformed input into a 4,096-byte array, and prints “REPRODUCED” if the 62-byte overwrite appears. Every write stays inside a real array, so the test does not crash the JVM.
GitHub repositories carrying the CVE ID have multiplied since the leak. The ashrafzaryouh/CVE-2026-114938 repository that Cyber Kendra reviewed only checks local Java versions and contains no exploit code. Fake “PoC” repositories that deliver malware are common after high-profile disclosures, so read any script before running it.
How to Check if You’re Vulnerable to Java4Shell
Start with the hardware, because it decides whether the vulnerable code can run at all. On Linux, Calif’s check is grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'. The host is in scope only if all four flags appear.
Next, find every Java runtime. java -version reports only the first Java on the shell’s path, so list running Java processes with ps -eo pid,args | grep '[j]ava' and resolve each binary with readlink -f /proc/<PID>/exe. jcmd <PID> VM.version reports the exact build of a live JVM. Check containers with docker exec <container> java -version or kubectl exec, and remember that Jira, Confluence, Jenkins and many other products bundle their own JDK.
To confirm a specific runtime, run Calif’s test program from its write-up on a non-production machine with the same CPU and JDK build. Qualys has published detection QID 389494 for Java4Shell, and Wiz has a Threat Center query for its customers.
How to Spot Java4Shell Attack Attempts
Upwind suggests three signals for detection teams. First, look for Base64-style tokens of 32 or more characters that end in = and whose length is not a multiple of four, starting with Authorization headers. Second, look for bursts of IllegalArgumentException errors from java.util.Base64$Decoder in application logs. Third, look for unexplained hs_err_pid*.log crash files or bursts of JVM restarts, because failed grooming attempts can crash the JVM.
None of these signals proves compromise, and their absence does not prove a server is safe, Upwind notes. Any internet-facing system that matched all the exposure conditions before patching should be checked for signs of compromise, not just updated.
How to Fix and Mitigate Java4Shell
Patch first. Install your vendor’s fixed build and restart every Java process, because replacing files does not change a JVM that is already running. Rebuild container images on a patched base image, since floating tags such as eclipse-temurin:17 only pick up a fix when the image is rebuilt and redeployed, update the JDKs bundled inside products such as Jira, Confluence and Jenkins through their vendors’ releases, and confirm that the running build is the fixed one.
If you can’t patch yet, Calif recommends starting the JVM with -XX:-UseBASE64Intrinsics, which disables the hardware-accelerated Base64 code. The alternative, -XX:UseAVX=2, turns off AVX-512 entirely. Use it only on x86-64 hosts, because OpenJDK on ARM doesn’t recognise the flag and will fail to start. Both flags need a restart, and both can slow Base64-heavy or vector-heavy workloads.
After adding a flag, confirm it reached the JVM. java -XX:+PrintFlagsFinal -version | grep -i base64 shows the setting for a fresh JVM, and jcmd <PID> VM.flags shows a running one. Flags set in a shell profile often never reach services started by systemd, Tomcat scripts or container entrypoints. Setting the JAVA_TOOL_OPTIONS environment variable is one way to apply them across launchers.
For servers that can’t be restarted at all, security firm Theori has published a runtime hot patch. It attaches a Java agent to a running JVM and keeps the vulnerable Base64 method out of C2 compilation.
The Theori hot patch has caveats:
- It lives in memory only and is lost on restart.
- It cannot undo corruption that has already happened.
- It can cause a CPU spike while compiled code is rebuilt.
VM.flagswill still show the intrinsic as enabled even when the patch is working.- Its quick-install command pipes a script from Theori’s server straight into the shell.
Review the script first, test it, and use it only as a bridge to a restart with the flag or the patch.
Reduce exposure while you work. Wiz recommends restricting external access to management portals such as Jira, Jenkins and Keycloak until fixes are deployed and prioritising internet-facing packaged Java apps. Wiz says web application firewall rules cannot cover every code path, and Qualys says a reverse proxy is not a reliable control.
Java4Shell vs Log4Shell: What’s the Same and What Isn’t
The name deliberately echoes Log4Shell (CVE-2021-44228), the December 2021 flaw in the Apache Log4j logging library that scored a maximum 10.0. Both are unauthenticated RCE bugs reachable through everyday input, and both hit code that almost every Java shop runs without a second thought.
Exploitation is far harder. Log4Shell was a logic flaw: one string such as ${jndi:ldap://…} in any logged field made the server fetch and run remote code, the same way on every target. Java4Shell is memory corruption that only works on certain CPUs and needs per-application heap grooming, which is why OpenJDK rates its attack complexity as high and why Calif says there is no universal payload. That makes the spray-one-payload-at-the-whole-internet attacks that defined Log4Shell much harder to repeat.
Finding and fixing it is harder too. Log4Shell lived in a library, so dependency scanners that looked for log4j-core found it, and upgrading one JAR fixed it. Java4Shell lives in the JDK, so tools that scan application dependencies won’t flag it. The fix means replacing the Java runtime itself on every host, container image and appliance with a bundled JDK, and its reach depends on the server’s CPU model, something few asset inventories track.
Found by AI in an Hour for Under $200
Calif says its researcher Quang Luong used OpenAI’s Codex to audit HotSpot’s JIT compiler, intrinsics and cryptography code. Codex surfaced the Base64 bug after about 20 minutes of prompting past false positives.
Luong spent an hour on discovery and two more hours building the first working exploit, at a total AI token cost of under $200. The New York Times reported that Calif used OpenAI’s GPT-6 Cyber model. Jenish Rakholiya improved the exploit, and AI agents built most of the later product chains almost autonomously, according to Calif.
This is Calif’s second leaked disclosure in a month. Calif also found PHP2Shell, a pair of 9.2-rated PHP flaws whose details leaked on October 20, before their planned October 22 disclosure. Attackers were exploiting PHP2Shell within a week, and CISA added both flaws to its KEV catalog.
Calif argues the bigger lesson is about unneeded code. The AVX-512 decoder helps applications that decode huge volumes of Base64, but it ships to everyone, including services that decode a few hundred bytes at a time. Calif is calling for “vibe-uncoding”: using AI to find and remove dead code and needless optimisations to shrink attack surface.
Java was already having a busy year. Waratek counted a record 5,649 Java flaws published in 2026, of which attackers had used 18 by November 1.
Java4Shell FAQ
Which Java versions are affected by Java4Shell?
OpenJDK 17.0.6 and later, Java 21, 25 and 27 before the November 17, 2026 fixes, and Oracle Java SE 8 Enterprise Performance Pack 8u511b33-perf. The affected code runs only on x86-64 CPUs with AVX-512 VBMI.
Is Java 8 or Java 11 affected?
No. Standard Java 8 and Java 11 builds don’t contain the vulnerable decoder. The only Java 8 exception is Oracle’s Enterprise Performance Pack (8u511b33-perf), fixed in 8u513-perf.
Am I affected on ARM, AWS Graviton or Apple Silicon?
No. Calif says ARM64 processors are not affected because the vulnerable routine exists only for x86-64 chips with AVX-512 VBMI.
What is the workaround for CVE-2026-114938?
Start the JVM with -XX:-UseBASE64Intrinsics, or with -XX:UseAVX=2 on x86-64 hosts only, then restart and verify the flag took effect. Both are temporary measures. Install the fixed build as soon as your vendor ships it.
Is there a public exploit for Java4Shell?
Calif has published a safe trigger that proves the memory overwrite, plus its general exploitation technique, but not its weaponised chains for Jira, Jenkins and other products. Wiz says it built its own PoC. No attacks in the wild have been reported.
Who discovered Java4Shell?
Quang Luong of Calif found the bug and wrote the exploits, with exploit improvements by Jenish Rakholiya. Oracle credits Albert Yang and Quang Luong of Calif.io.
Updates
2026-11-18, 7:30 a.m. IST: Added Amazon Corretto fixed builds for Java 17, 21, 25 and 27, current Temurin and Microsoft status, the JDK-8393212 upstream fix details, AhnLab’s upstream build guidance, and Amazon’s and Datadog’s narrower readings of the impact.
2026-11-18, 7 a.m. IST: Added Upwind’s lab results (Temurin builds confirmed vulnerable, pre-auth paths in Spring Security, Tomcat, Jetty and java-jwt), cloud instance types in scope on AWS, Azure and Google Cloud, attack-detection signals, the JDK-8296735 backport and JDK-8393212 fix IDs, and container rebuild guidance.
2026-11-18, 5 a.m. IST: Rewritten after Calif’s technical disclosure and the Oracle and OpenJDK fixes. Added the root cause, the affected and fixed builds, the exploited products, the official CVSS 3.1 score, Calif’s mitigation flags and safe test, Theori’s runtime hot patch, and the AI discovery details.
2026-11-17, 11 p.m. IST: Added the Java4Shell name, Oligo’s early technical description, the JDK-8268276 backport history, a temporary mitigation and a comparison with Log4Shell.
Community Discussion
Join the conversation. Ask questions, share solutions, and help others.
Be the first to start the discussion!
