Java4Shell (CVE-2026-114938): What the OpenJDK Base64 Bug Means for Your Code and Containers (2026)

A heap overflow in OpenJDK's AVX-512 Base64 decoder was patched on 17 November 2026. What Calif, Oracle and CISA report, how to check your hosts, and illustrative Java and JavaScript guards for pre-auth token handling.

On 17 November 2026 Oracle and OpenJDK shipped fixes for CVE-2026-114938, a heap memory corruption bug nicknamed Java4Shell. Calif, which reported it (Oracle also credits Albert Yang), says an unauthenticated remote attacker can overwrite heap memory with a short malformed Base64 string and, in the products it tested, reach remote code execution. CISA urged immediate patching the same day and calls the bug “critical”, while the CVSS 3.1 rating is 8.1 (High). Code below is illustrative, not vendor code, and no substitute for patching.

What is confirmed

Per Calif’s write-up, HotSpot’s C2 JIT compiler uses an x86-64 AVX-512 VBMI intrinsic to decode Base64 quickly. The hand-written code for the padded tail miscalculates the output length when the remaining tail is only padding. The length underflows, the store mask becomes all ones, and 64 bytes are written where fewer were expected. For the 65-character trigger (64 A characters plus one =), Calif says OpenJDK allocates a 50-byte result array and the write lands 62 bytes past its end. Java then rejects the input, but the write has already happened. Calif says OpenJDK 17 needs 128 A characters plus =, and the decoder must first be JIT-compiled by earlier valid traffic.

Calif reports working exploits in default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate (pre-auth), plus five post-auth products including Kafka and Elasticsearch. It says discovery took about an hour with Codex and the first exploit two more hours. It also says there is no universal exploit, wrong heap placement can crash the JVM, and weaponized chains are withheld until people have had time to upgrade. Sysdig found no public exploit code as of 21:10 UTC on 17 November and warns that repositories promising a shell may be fake.

Scope and scoring

ItemDetailSource
Affected (Oracle)Java SE 8u511b33-perf, 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, 27.0.1.0.3; GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3; GraalVM Enterprise Edition 21.3.20.0.3NVD, CVE record
UpstreamOpenJDK 17.0.6 and newer, plus downstream builds (Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat)Calif
Hardwarex86-64 with AVX-512 VBMI; ARM64 not affectedCalif
ScoreCVSS 3.1 8.1 (AV:N/AC:H/PR:N/UI:N), Oracle CNA; Calif claims 9.2 under CVSS 4.0CVE record, Calif
KEVNot in catalog 2026.11.17 (released 17:53 UTC, before the CVE was published at 21:32 UTC, so absence is not informative yet)CISA KEV JSON

The 8.1 is the CNA (Oracle) score. When we checked on 18 November, NVD showed the entry as “Received” with that Oracle-supplied score and no NVD-primary score. The 9.2 is the researcher’s own claim. CISA’s SSVC entry (CISA-ADP) rated exploitation “none” as of 17 November.

Step 1: check your exposure

Calif’s check for Linux hosts:

grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

All four flags must appear. Then run java -version inside the container, since, as Sysdig notes, the host’s JDK is not the container’s. Container and vendor JDK builds do not update themselves, so rebuild and redeploy.

Step 2: patch or apply a flag

Per Sysdig only, the fixed Oracle builds are 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and 8u513 for the performance build, and its 20:00 UTC snapshot on 17 November showed other distributions still pending, so check your vendor. If you cannot patch yet, Calif recommends -XX:-UseBASE64Intrinsics, or -XX:UseAVX=2 on x86-64 hosts only (ARM fails to start with it). Both need a restart. Sysdig warns that -XX:DisableIntrinsic=_base64_decodeBlock needs -XX:+UnlockDiagnosticVMOptions, and a wrong flag pushed fleet-wide through JAVA_TOOL_OPTIONS is a self-inflicted outage.

Step 3: review what you decode before authenticating

Per Sysdig only, Spring Security, Tomcat and Jetty 12 Basic auth handling pass the raw token to Base64.getDecoder() before validating it, and Auth0’s java-jwt decodes JWT headers and payloads before checking the signature. In our judgement, custom code that decodes a client-controlled string before authentication is in the same category. CISA’s alert suggests, as a temporary measure, validating Base64 input at the application boundary and enforcing size limits. An untested illustrative strict pre-check (example only):

import java.util.regex.Pattern;

// EXAMPLE ONLY: defense in depth, not a fix for CVE-2026-114938.
final class Base64Guard {
    private static final Pattern STRICT = Pattern.compile("^[A-Za-z0-9+/]*={0,2}$");

    static boolean plausible(String token, int maxLen) {
        return token != null
            && token.length() <= maxLen
            && token.length() % 4 == 0
            && STRICT.matcher(token).matches();
    }
}

Our judgement: this rejects the published trigger shape (65 characters, not a multiple of four) before the decoder sees it, but we have not tested it against every variant Calif describes. Treat it as risk reduction only. It may also reject legitimate unpadded base64url JWT parts, which we have not tested. Calif also notes that request buffering (nginx default) breaks some of its chains but is not a general mitigation.

Step 4: hunt for attempts

Sysdig suggests flagging Base64-alphabet tokens of 32 or more characters that end in = and whose length is not a multiple of four, starting with Authorization headers. It also suggests searching logs for IllegalArgumentException: Input byte array has wrong 4-byte ending unit, hs_err_pid*.log crash files and bursts of worker restarts. Sysdig frames these as heuristics; for exploitation we found no evidence as of 18 November 2026 in the NVD CISA-ADP SSVC entry (“none”), CISA KEV 2026.11.17 or the CISA alert. An untested illustrative helper (example only):

// EXAMPLE ONLY: implements the request-shape heuristic described by Sysdig.
function suspiciousToken(token) {
  return token.length >= 32 &&
    /^[A-Za-z0-9+/]+=+$/.test(token) &&
    token.length % 4 !== 0;
}

// Usage: suspiciousToken(authHeader.replace(/^Basic\s+/i, ""))

Our takeaways

These are our opinions, not the sources’. Memory safety in managed runtimes stops at the native and assembly layer, so JDK patch cadence matters as much as library patch cadence. If your cycle is measured in weeks, Calif’s timeline (about an hour to find, two more to exploit, about three in total) is a reason to shorten it for internet-facing Java services.

Sources