Java4Shell Unmasked: How CVE-2026-114938 Turns Base64 Into Remote Code Execution
Summary
Java is widely considered memory-safe, but CVE-2026-114938, known as Java4Shell, demonstrates where that assumption ends. The vulnerability does not exist in ordinary Java application code. It exists inside the JVM's native, hardware-accelerated implementation of Base64 decoding.
On affected OpenJDK 17 and later runtimes running on compatible x86-64 processors, specially malformed Base64 input can trigger an incorrect vector write mask. Instead of writing only the expected decoded bytes, the vulnerable AVX-512 intrinsic may perform a complete 64-byte write. In a demonstrated case, this overwrote 62 bytes beyond the intended output buffer.
The malformed input may ultimately be rejected by the Java API, but the rejection occurs after native memory has already been corrupted. Researchers demonstrated memory corruption, controlled memory disclosure, and application-specific pre-authentication remote code execution. These findings do not mean every Java application is remotely exploitable: the vulnerable runtime, required processor features, enabled intrinsic, and an attacker-controlled Base64 input path must all be present.
Oracle addressed Java4Shell as part of its November 2026 Critical Security Patch Update, which contains ten additional Java security fixes affecting the compiler, JavaFX, JGSS, JSSE, HotSpot, and Java libraries. Oracle classifies all 11 issues as remotely exploitable without authentication, but several have Java sandbox or untrusted-code requirements that significantly limit their relevance to ordinary server deployments.
No confirmed in-the-wild exploitation, campaign-specific infrastructure, malware, or threat-actor attribution had been publicly established at the time of publication. However, public technical details and proof-of-concept material make rapid exposure assessment and remediation essential.
Why Can a Memory-Safe Language Suffer Memory Corruption?
Java application code normally runs inside a managed environment. The JVM performs bounds checks, manages object lifetimes, and uses garbage collection to prevent many memory-safety errors commonly found in native applications.
The JVM itself, however, contains substantial native code. HotSpot uses JIT compilation, assembly routines, and processor-specific intrinsics to improve performance. These optimized routines operate below the protections available to ordinary Java bytecode.
Base64 decoding is a common operation, so HotSpot accelerates it with CPU vector instructions where supported. Java4Shell exists in this optimized native path, not in the memory-managed Java implementation. Once execution enters the vulnerable intrinsic, an incorrect length or write mask can corrupt memory even though the calling Java application follows normal type and memory-safety rules.
A memory-safe programming language does not automatically make its runtime, native libraries, JIT compiler, or hardware-specific optimization routines immune to memory-corruption vulnerabilities.
Enterprise Exposure and Hidden Java Runtimes
Java runtimes are frequently embedded inside enterprise applications rather than installed as a visible system package. A single host may contain a system Java installation, one or more product-bundled runtimes, containerized Java applications, and separate JDKs used by build or automation tools.
Updating the default java executable may therefore leave vulnerable
JVMs running elsewhere on the same system. Security teams must identify the exact
runtime used by every relevant application, including its vendor, architecture,
complete build version, startup flags, and processor capabilities.
After updating, affected applications and containers must be restarted or redeployed. A corrected Java package on disk does not remediate a JVM process that is still running the older vulnerable code.
Vulnerability Details
Oracle's November Java update contains three distinct applicability categories. This distinction prevents the phrase “remotely exploitable without authentication” from being interpreted as identical exposure across every Java server.
| Applicability category | CVEs | Relevant exposure condition |
|---|---|---|
| API or web-service exposure | CVE-2026-114938, CVE-2026-114941, CVE-2026-114942 | Crafted data must reach an API in the affected component, including through a web service. An untrusted applet or Java Web Start application is not required. |
| Sandboxed untrusted-code exposure | CVE-2026-86144, CVE-2026-114939, CVE-2026-114947 | Primarily applies to deployments that run untrusted Java Web Start applications or applets and rely on the Java sandbox. Oracle states that these issues do not apply to typical servers loading only trusted code. |
| API exposure or sandboxed code | CVE-2026-114940, CVE-2026-114943, CVE-2026-114944, CVE-2026-114945, CVE-2026-114946 | May be reached through affected APIs supplied with crafted data or through sandboxed deployments that load and execute untrusted code. |
| CVE | Component | CVSS | Primary impact | Applicability |
|---|---|---|---|---|
| CVE-2026-114938 | Compiler and Base64 intrinsic | 8.1 High | Memory corruption and potential RCE | Attacker-controlled data reaching the affected API |
| CVE-2026-86144 | JavaFX and libxml2 | 7.5 High | Confidentiality, integrity, and availability impact | Sandboxed untrusted code and user interaction |
| CVE-2026-114939 | JGSS | 7.4 High | Confidentiality and integrity impact | Sandboxed untrusted code |
| CVE-2026-114940 | JSSE and TLS | 7.4 High | Confidentiality and integrity impact | Affected API or sandboxed untrusted code |
| CVE-2026-114941 | Compiler | 7.0 High | Availability with limited data impact | Attacker-controlled data reaching the affected API |
| CVE-2026-114942 | Java libraries | 7.0 High | Availability with limited data impact | Attacker-controlled data reaching the affected API |
| CVE-2026-114943 | HotSpot | 6.5 Medium | Integrity and availability impact | Affected API or sandboxed untrusted code |
| CVE-2026-114944 | Core Java libraries | 5.9 Medium | High integrity impact | Affected API or sandboxed untrusted code |
| CVE-2026-114945 | Java libraries | 5.3 Medium | Limited integrity impact | Affected API or sandboxed untrusted code |
| CVE-2026-114946 | Compiler | 4.8 Medium | Limited confidentiality and integrity impact | Affected API or sandboxed untrusted code |
| CVE-2026-114947 | JSSE and TLS | 3.7 Low | Limited integrity impact | Sandboxed untrusted code |
Java4Shell Affected Versions
Affected OpenJDK Release Families
The vulnerable Base64 intrinsic was introduced in OpenJDK 17.0.6. Affected OpenJDK-derived releases include vulnerable builds in the Java 17, 21, 25, and 27 families when they run on compatible x86-64 processors and use the vulnerable intrinsic.
Standard OpenJDK 8 and OpenJDK 11 do not contain this vulnerable code path and are not affected by Java4Shell. Their November updates address other security and maintenance issues.
Oracle-Listed Vulnerable Builds
| Oracle product | Oracle-listed builds affected by CVE-2026-114938 |
|---|---|
| Oracle Java SE | 8u511b33-perf, 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, and 27.0.1.0.3 |
| Oracle GraalVM for JDK | 17.0.21.0.3 and 21.0.13.0.3 |
| Oracle GraalVM Enterprise Edition | 21.3.20.0.3 |
The specifically listed Oracle Java 8 Enterprise Performance Pack build is affected because it contains the relevant optimized code. Ordinary Java 8 and Java 11 installations are not affected by Java4Shell. Java 8u513 and Java 11.0.33.1 should not be described as Java4Shell-specific fixes; they address other vulnerabilities and maintenance changes in the November release.
Other OpenJDK distributions use their own build identifiers and update schedules. Administrators must follow the advisory issued by the vendor supplying the runtime rather than treating Oracle's exact build list as the complete OpenJDK affected range.
Inside the Base64 Decoder: How the Memory Overwrite Happens
HotSpot's x86-64 Base64 intrinsic processes input in vector-sized blocks. For a short final block, it calculates an output length and creates a mask identifying which bytes may be written to the destination.
The expected decoded length is initially calculated from the remaining Base64 input. The decoder then subtracts bytes for padding characters. With specially malformed final blocks, the calculated output length reaches zero before the padding adjustment is applied.
Subtracting the padding from zero causes the length to underflow to a negative value. When that invalid length is passed to the mask-generation instruction, the operation produces an all-ones mask rather than an empty or appropriately limited mask.
Every enabled bit allows one byte from the vector register to be written. The all-ones mask therefore authorizes a complete 64-byte vector write even when the output buffer has space for only a small number of decoded bytes.
In the published demonstration, only two output bytes were expected, but the intrinsic wrote 64 bytes. The remaining 62 bytes landed beyond the intended decoded output. Java subsequently threw an exception for the malformed input, but the overwrite had already occurred.
From a Decoder Bug to Remote Code Execution
Proof-of-concept maturity matters. A trigger that crashes a JVM proves that a vulnerable path can be reached, but it does not automatically provide useful control over the corrupted memory.
The published bounded proof of concept safely demonstrates the 62-byte overwrite inside an allocated array. It establishes the underlying memory corruption without intentionally damaging unrelated memory or executing commands.
Researchers subsequently developed stronger primitives, including controlled memory corruption and disclosure. They also reported application-specific pre-authentication, post-authentication, and client-side code-execution demonstrations.
These demonstrations confirm that the vulnerability can progress beyond a JVM crash. They do not establish that every Java application is exploitable. Each application exposes different Base64 input paths, object layouts, process privileges, memory behavior, and security controls.
At publication time, the available evidence supported practical exploitation research but did not establish active malicious exploitation in the wild.
Java4Shell vs. Log4Shell
| Characteristic | Java4Shell | Log4Shell |
|---|---|---|
| Affected layer | JVM hardware-accelerated Base64 decoder | Application logging library |
| Primary weakness | Native heap-buffer overflow | Unsafe message lookup and remote loading behavior |
| Processor dependency | Requires compatible x86-64 AVX-512 VBMI hardware | Not dependent on a particular processor instruction set |
| Input requirement | Malformed Base64 must reach the affected Java decoder | Attacker-controlled text must reach a vulnerable logging path |
| Remediation scope | Update every affected JVM, including bundled and containerized runtimes | Update or remove the affected library and remediate packaged copies |
The similar names describe very different security problems. Java4Shell should not be treated as a repeat of Log4Shell or as evidence that every application using Java is directly exploitable.
Detection and Investigation Considerations
No confirmed campaign-specific IP addresses, domains, file hashes, payloads, or command-and-control infrastructure were available at publication time. The following observations indicate possible exposure or suspicious behavior, but none independently proves compromise.
- Inventory every JVM: Identify system installations, application-bundled runtimes, containers, appliances, build tools, and independently deployed JDKs.
-
Confirm the active runtime:
Use
java -versionfrom the exact executable path used by the application. For running JVMs, verify the executable, vendor, complete build, architecture, and startup arguments. -
Check all required processor flags:
On Linux, use:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'. All four flags should be present before treating the hardware as matching the published vulnerable configuration. -
Confirm intrinsic usage:
Check whether the JVM permits the Base64 intrinsic and whether it has been
started with
-XX:-UseBASE64Intrinsicsor an AVX-level restriction. -
Identify attacker-controlled Base64 paths:
Review authentication data, tokens, protocol artifacts, MIME content, API
parameters, and other pre-authentication input decoded by
java.util.Base64.Decoder. - Investigate malformed Base64 requests: Look for unusual padding, invalid final-block lengths, repeated decoding errors, and bursts of related requests. These patterns remain suspicious rather than confirmed IOCs.
-
Review JVM failures:
Investigate
hs_err_pid*.logfiles, segmentation faults, core dumps, fatal JVM errors, unexplained restarts, and crashes involving compiled or vectorized Base64 processing. - Monitor post-corruption behavior: Investigate abnormal Java child processes, shell execution, newly created executables, unexpected file modifications, or unusual outbound connections.
Exposure Prioritization Matrix
| Runtime and environment | CPU and intrinsic | Untrusted Base64 path | Recommended priority |
|---|---|---|---|
| Affected Java 17+ or listed Oracle Performance Pack build | Required x86-64 flags present; intrinsic enabled | Pre-authentication or internet-facing input | Immediate |
| Affected runtime | Required processor flags present; intrinsic enabled | Authenticated, internal, or indirectly reachable input | High |
| Affected runtime | Required processor flags present | No identified input path or mitigation flag applied | Medium pending verification |
| Standard OpenJDK 8 or 11 | Any processor | Any input path | Not affected by Java4Shell; assess the other November CVEs |
| Affected release family | ARM64 or x86-64 without the required AVX-512 VBMI capabilities | Any input path | Not known to be exploitable through the published hardware-specific path |
| Patched runtime | Any supported processor | Any input path | Verify restart or redeployment and continue monitoring |
MITRE ATT&CK Mapping
No confirmed malicious campaign has been attributed to Java4Shell. Accordingly, no technique is presented as observed adversary behavior.
| Tactic | Technique | ID | Evidence status |
|---|---|---|---|
| Reconnaissance | N/A | N/A | No observed campaign activity |
| Resource Development | N/A | N/A | No observed campaign activity |
| Initial Access | N/A | N/A | No confirmed in-the-wild exploitation |
| Execution | N/A | N/A | Research demonstrations are not treated as adversary activity |
| Persistence | N/A | N/A | No persistence behavior reported |
| Privilege Escalation | N/A | N/A | No privilege-escalation behavior reported |
| Defense Evasion | N/A | N/A | No defense-evasion behavior reported |
| Credential Access | N/A | N/A | No credential-access behavior reported |
| Discovery | N/A | N/A | No discovery behavior reported |
| Lateral Movement | N/A | N/A | No lateral-movement behavior reported |
| Collection | N/A | N/A | No collection behavior reported |
| Command and Control | N/A | N/A | No command-and-control infrastructure identified |
| Exfiltration | N/A | N/A | No exfiltration behavior reported |
| Impact | N/A | N/A | No confirmed malicious impact activity |
Java4Shell Patch, Workaround, and Mitigation
- Update affected Java 17+ runtimes: Install the corrected security build supplied by the OpenJDK distribution or product vendor. Do not use Java 8u513 or Java 11.0.33.1 as Java4Shell remediation guidance for ordinary Java 8 or Java 11 installations.
-
Update the affected Oracle Java 8 Performance Pack:
Treat the specifically listed
8u511b33-perfbuild separately from ordinary Java 8. -
Use the targeted temporary mitigation:
Start affected JVMs with
-XX:-UseBASE64Intrinsicsto disable the hardware-accelerated Base64 implementation while retaining other processor optimizations. -
Use the broader x86-64 alternative when required:
-XX:UseAVX=2prevents the JVM from using AVX-512. Apply it only to supported x86-64 JVMs. ARM JVMs may not recognize the option and can fail to start. - Treat both flags as temporary: Apply the vendor security update even when a mitigation flag appears effective. Test startup, compatibility, and performance before production deployment.
- Prioritize exposed Base64 paths: Remediate internet-facing applications and authentication services that decode attacker-controlled Base64 data before authentication.
- Update bundled runtimes through supported channels: Use the product vendor's update where an application or appliance packages its own JVM. Replacing the embedded runtime independently may create an unsupported configuration.
- Rebuild container images: Update the Java base image, rebuild affected application images, redeploy the workload, and remove older vulnerable images from active use.
- Restart every affected JVM: Confirm that corrected files on disk are actually loaded by the running application.
- Verify remediation: Re-inventory active processes, containers, application directories, and appliances. Record the effective runtime version and JVM arguments for each application.
- Address the other November Java CVEs: Java 8, Java 11, JavaFX, and GraalVM updates may still be required for the remaining vulnerabilities even where Java4Shell itself does not apply.
Key Takeaways
Saner remediation coverage: Saner Patch Management helps organizations identify affected Oracle Java and supported OpenJDK installations, detect missing security updates, and deploy the applicable vendor patches across managed endpoints. It also provides remediation visibility to help teams verify that updated Java builds are installed and reduce the risk of vulnerable runtimes remaining active.
- Java4Shell is a native memory-corruption vulnerability inside the JVM's hardware-accelerated Base64 decoder, not a weakness in ordinary managed Java application memory.
- Practical exposure requires four conditions: a vulnerable runtime, compatible x86-64 CPU features, an enabled Base64 intrinsic, and attacker-controlled input reaching the affected decoder.
- Research has progressed beyond a crash-only PoC to memory-corruption, disclosure, and application-specific code-execution demonstrations, but no confirmed active exploitation was identified at publication time.
- Updating the host's default Java package is insufficient when applications, containers, or appliances include separate runtimes. Every JVM must be updated, restarted, and independently verified.
Official References
Oracle November 2026 Security Advisory OpenJDK Security Advisory Red Hat Java4Shell Bulletin Canadian Cyber Centre Alert
Instantly Fix Risks in Endpoints & Cloud with Saner
Saner is a continuous and integrated vulnerability and exposure management platform that instantly fixes risks across endpoints and cloud environments.
Schedule a Demo



