TL;DR
- CVE-2026-114938 ("Java4Shell") is an out-of-bounds write in the Java Virtual Machine's fast Base64 decoder on x86-64 CPUs with AVX-512. A crafted Base64 string makes the decoder write past the end of a Java heap array [1][2].
- Calif, who found the bug, reports pre-authentication remote code execution against Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate [1]. Independent parties have so far confirmed the memory corruption, not the full exploit chains [3][4][5].
- OpenJDK has released fixed builds 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Until those reach you, a JVM flag turns the vulnerable code off. Both the patch and the flag only take effect when the JVM restarts.
- The bug lives entirely inside the JVM process, so no kernel-level control can prevent it. What Photon can do, without restarting the JVM on hosts where BPF LSM is already enabled, is cap what injected code does next: no shell, no attacker tooling, no persistence, no injection into other processes.
What happened
On November 17, 2026, OpenJDK and Oracle published their Java security updates. Among them is CVE-2026-114938, a flaw in HotSpot's just-in-time compiler [2][6]. Oracle credits Quang Luong of Calif.io and Albert Yang [6], and Calif published a technical write-up the same day under the name Java4Shell [1].
For certain hot Java methods, HotSpot substitutes a hand-written machine-code routine, called an intrinsic. On CPUs that support AVX-512 VBMI, the intrinsic for java.util.Base64 decoding works through its input 64 bytes at a time and handles whatever is left over in one final masked store. The bug is in that last step. For a short padded tail, fewer than four characters ending in =, the routine's calculation of how many bytes to write goes negative. The mask that should limit the store then permits all 64 bytes [1][3]. The decoder writes about 62 bytes past the end of its destination array, and only afterwards does the Java code reject the input as malformed, with the same exception a patched JVM throws [1][3][4].
Two properties shape the risk. First, the overflowing buffer is a Java heap array, so the write corrupts whatever object sits next to it [1][3]. Second, the bytes written are chosen by the decoder rather than the attacker. Equixly argues that the realistic outcome is therefore a JVM crash [3], while Calif describes a multi-stage chain that turns the corruption into a memory disclosure and then into code execution [1]. Calif has withheld the product-specific chains until patches are deployed [1], and Endor Labs notes that "Calif states there is no universal exploit" [4]. Semgrep and Endor Labs have independently confirmed the out-of-bounds write [4][5].
The fix, JDK-8393212, sends short tails back to the ordinary Java decoding path instead of the vectorized store [7]. The OpenJDK advisory does not name the change that fixes CVE-2026-114938. We connect the two because the change corrects exactly the condition Calif describes, as Endor Labs also does [4].
Scope. OpenJDK marks the 17, 21, 25 and 27 lines as affected, but not 8 or 11 [2]. Oracle's advisory also lists a Java SE 8 performance build and Oracle GraalVM releases [6]. Exploitation requires an x86-64 CPU with AVX-512 VBMI, and ARM64 hosts are not affected [1]. An attacker also needs their data to reach the standard java.util.Base64 decoder, which happens routinely with HTTP Basic credentials, JSON Web Tokens decoded before their signature is checked, SAML messages, and Base64 fields in request bodies [3][5].
Severity and status. Calif scores the issue 9.2 under CVSS 4.0 [1]. OpenJDK and Oracle score it 8.1 under CVSS 3.1: reachable over the network without authentication, but with high attack complexity [2][6]. As of November 17, no exploitation in the wild has been reported, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog [4][8].
Why "just patch" will take longer than a day
OpenJDK's fixed releases are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1 [9][10][11][12]. Distributions such as Temurin, Corretto and Zulu rebuild from OpenJDK and ship on their own schedules [4], and a host is only safe once its vendor's build includes the fix.
Affected Java lines and fixed OpenJDK builds
Exploitation also requires an x86-64 CPU with AVX-512 VBMI; ARM64 hosts are not affected.
| Java line | OpenJDK status | Fixed OpenJDK build |
|---|---|---|
| JDK 17 | Affected | 17.0.21.1 |
| JDK 21 | Affected | 21.0.13.1 |
| JDK 25 | Affected | 25.0.5.1 |
| JDK 27 | Affected | 27.0.1.1 |
| JDK 8 and 11 | Not affected (OpenJDK) | Oracle also lists a Java SE 8 performance build and Oracle GraalVM releases |
Even then, Java runtimes hide in places that package managers do not reach. Atlassian products and many appliances bundle their own runtime. Container images have to be rebuilt and redeployed. And a running JVM keeps executing the vulnerable code until the process restarts [3], which for an identity provider, a CI controller or a ticketing system serving the whole company is a scheduled event, not a command. For a typical fleet, the window between disclosure and the last vulnerable JVM leaving production will be measured in weeks.
First, turn off the vulnerable path
Unlike most memory-corruption bugs, this one has a configuration mitigation that removes the vulnerable code entirely. Starting the JVM with -XX:-UseBASE64Intrinsics makes Base64 decoding use the ordinary Java implementation, which is not affected [1][5]. Calif and Semgrep also suggest -XX:UseAVX=2, which disables all AVX-512 code, but a JVM on ARM refuses to start with it, so shared configuration needs care [1][5]. If you can apply one of these flags, do so. It addresses the bug itself, which runtime enforcement cannot.
The catch is that the flag, like the patch, is read at startup. A JVM that cannot be restarted today keeps running the vulnerable decoder. The rest of this post is about those JVMs, and about the layer that should sit behind every JVM regardless.
The first hop is a system call
Whatever an attacker achieves inside the JVM, the corruption, the memory disclosure and the code execution all happen within the process's own memory. Nothing in the kernel sees any of it. But code running inside a JVM has the same problem as any other implant: to do anything beyond that memory, it has to ask the kernel.
- A shell or a commandWhether the payload calls
Runtime.exec()or makes the system call directly, the kernel has to start a new program. - ToolingDownloaders and network utilities are programs too, and they are started the same way.
- PersistenceCron entries, systemd units, SSH keys and the dynamic loader configuration are files, and writing them means opening them first.
- A network callA reverse shell or a command-and-control beacon needs an outbound connection.
- Another processInjecting into a neighboring process, to outlive a JVM restart or move sideways, requires attach-level access to it.
Each of those crosses a Linux Security Module (LSM) hook, and that is where Photon sits. Photon, Exein's runtime eBPF LSM engine, compiles rules into eBPF programs and attaches them to those hooks, so on a host where BPF LSM is already enabled, a policy can be loaded while the JVM keeps running.
One kernel detail makes the first hop easy to attribute: the hook that checks a new program runs before the kernel replaces the calling process with it [13]. Even when injected code calls the system call in place rather than forking first, the event still names the JVM as the caller.
The kernel boundary around the JVM
Everything up to code execution stays inside the process; every step after it has to cross the kernel.
Inside the JVM process
- Crafted Base64 reaches the decoder
- Heap corruption
- Memory disclosure
- Code execution
What the attacker needs next
- Start a shell or a command
- Run downloaders and tools
- Write cron, systemd, loader or SSH files
- Open an outbound connection
- Attach to another process
What Photon stops at each step
A containment policy follows the attacker through the steps that come after the exploit lands, scoped to the account the Java service runs as:
- Getting a shellBlockWhen the service's JVM tries to start a shell or a scripting interpreter, the attempt is blocked. JDK 17 and later start child processes through a small helper program,
jspawnhelper, so the policy treats it as part of the JVM [14]. - Fetching toolsBlockThe service account cannot run downloaders, netcat-style tools or SSH clients, whichever of its processes tries.
- Running anything elseAlertAny other program the JVM starts from outside its own runtime directory, including dropped binaries and payloads that exist only in memory, raises an alert. Once you know what the service legitimately runs, this step can be switched to block.
- PersistenceBlockWrites by the service account to cron, systemd, the dynamic loader configuration or SSH keys are blocked.
- Moving into other processesBlockAttempts by the JVM to attach to another process and inject code into it are blocked. The kernel skips this check when a process works on its own memory, so the JVM's normal behavior never triggers it [15].
The whole policy is a handful of rules. None of them depend on the Base64 bug, the target product or the exploit chain, so they apply equally to the next JVM memory-corruption bug and to deserialization or template-injection flaws.
Containment complements the patch and the flag rather than replacing them: the bug itself, a resulting crash and anything read from the JVM's memory stay out of reach of a kernel control. Outbound connections need a per-service allowlist, services that run programs by design should start in alert mode, and Photon needs Linux 6.12 or later with BPF LSM already enabled.
Patch, and bridge the gap
- Inventory every JVM.For each process, check the actual runtime version and whether the CPU advertises
avx512vbmi[3]. Bundled runtimes and container base images count. - Turn off the vulnerable path.Start JVMs with
-XX:-UseBASE64Intrinsicsuntil your vendor's fixed build is deployed. It takes effect at the next restart [1][5]. - Patch and restart.Move to OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, or your vendor's equivalent build. Rebuild container images and restart every JVM [3].
- Contain the JVMs you cannot restart yet.Put a containment policy around them now, so that a successful exploit stays confined to what the JVM process itself can reach. Leave it in place after patching.
Java4Shell will not be the last bug that turns a few malformed bytes into code execution inside a managed runtime, and the next one will take the same first hop. An attacker may own the JVM's memory, but not the kernel boundary around it. To see how Photon enforces that boundary on your own Java fleet, contact the Exein team for a demo.
Contain your Java fleet while you patch.
Book a demo [ → ]References
- Calif — Java4Shell: Write once, RCE everywhere (Nov 2026).
- OpenJDK — OpenJDK Vulnerability Advisory: 2026/11/17 (Nov 2026).
- Equixly — CVE-2026-114938: Pre-auth heap overflow in Java 17, 21, and 25 (Nov 2026).
- Endor Labs — Java4Shell (CVE-2026-114938): Pre-Auth Heap Overflow in OpenJDK (Nov 2026).
- Semgrep — Java4Shell: Critical OpenJDK Base64 RCE (CVE-2026-114938) (Nov 2026).
- Oracle — Oracle Critical Security Patch Update Advisory, November 2026 (Nov 2026).
- OpenJDK — 8393212: Base64 optimization improvements (mainline commit 5177a70, Nov 2026).
- watchTowr — Java CVE-2026-114938 FAQ (Nov 2026).
- OpenJDK jdk17u — release tag jdk-17.0.21.1-ga.
- OpenJDK jdk21u — release tag jdk-21.0.13.1-ga.
- OpenJDK jdk25u — release tag jdk-25.0.5.1-ga.
- OpenJDK — 8393212: Base64 optimization improvements (jdk27u commit 564fc7d, in release jdk-27.0.1.1-ga).
- Linux kernel v6.12 — fs/exec.c (bprm_execve).
- OpenJDK jdk17u — ProcessImpl.java at jdk-17.0.21.1-ga (default launch mechanism on Linux).
- Linux kernel v6.12 — kernel/ptrace.c (__ptrace_may_access).



