critical

CVE

CVE-2026-114938

CWE

CWE-191, CWE-122, CWE-787

Affected Surface

  • OpenJDK 17.0.6 through 17.0.21 (Oracle 17.0.21.0.3), and all OpenJDK 21, 25 and 27 builds before 21.0.13.1, 25.0.5.1 and 27.0.1.1
  • Oracle Java SE 8u511b33-perf (Java 8 Enterprise Performance Pack), Oracle GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3, Oracle GraalVM Enterprise Edition 21.3.20.0.3
  • Every OpenJDK-based distribution until its vendor ships a fix: Eclipse Temurin, Amazon Corretto, Azul Zulu, Microsoft Build of OpenJDK, BellSoft Liberica, SAP SapMachine, Red Hat build of OpenJDK
  • Only on x86-64 CPUs exposing avx512f, avx512bw, avx512vbmi and bmi2 (Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids; AMD Zen 4 and newer). ARM64 is not affected
  • Applications that pass attacker-controlled data to java.util.Base64 decoding: HTTP Basic auth, JWT, SAML, cookies, uploads. Calif reports pre-auth RCE in default Keycloak, Atlassian Jira and Confluence, JFrog Artifactory, Jenkins and PingFederate

TL;DR

Calif disclosed Java4Shell (CVE-2026-114938) on 17 November 2026, the same day Oracle and the OpenJDK project shipped fixes. The bug is in HotSpot’s hand-written x86-64 AVX-512 stub for java.util.Base64 decoding, which the JIT uses once a decode call gets hot. For a padded tail shorter than one 4-byte block, the stub computes a negative output length, the store mask ends up all ones, and a 64-byte vector store writes 62 bytes past the end of the decoded array. Java then throws IllegalArgumentException for the bad input, but by then the neighbouring heap objects are already overwritten.

The trigger is 64 A characters followed by = (128 As and = on older OpenJDK 17). The written bytes are mostly fixed, but Calif built a chain on top of that overwrite: corrupt an adjacent array’s length, read back heap memory (a Heartbleed-style leak), then reach the code cache for code execution. It reports pre-auth RCE in default configurations of Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate, and post-auth RCE in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. Calif published the trigger and a bounded PoC but is holding back the per-product exploits.

You’re exposed only when all three of these hold:

  • the JVM is OpenJDK 17.0.6 or later on 17, or any 21, 25 or 27 build before the fix (plus Oracle’s Java 8 Performance Pack build);
  • the CPU exposes avx512f, avx512bw, avx512vbmi and bmi2 (Intel Ice Lake and newer Xeons, AMD Zen 4 and newer). ARM64 is not affected;
  • attacker-controlled data reaches the JDK’s Base64 decoder. Basic auth headers, JWTs, SAML messages, cookies and file uploads all do.

What to do now:

  1. Upgrade to a fixed build: Oracle 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 (and 8u513 for the Performance Pack); Corretto 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4; Zulu 17.70.201, 21.54.201, 25.38.201, 27.30.201. Restart every JVM and rebuild container images.
  2. If your vendor has no fixed build yet (Eclipse Temurin and Red Hat as of 18 November), start JVMs with -XX:-UseBASE64Intrinsics. It removes only the vulnerable code path.
  3. Patch identity providers and anything that decodes Basic auth or tokens before login first: Keycloak, Jenkins, Jira, Confluence, Artifactory, PingFederate.

Affected packages and projects

EcosystemPackageAffected versionsFixed or safe version
OpenJDK (upstream)JDK 1717.0.6 to 17.0.21 (Oracle 17.0.21.0.3)17.0.21.1
OpenJDK (upstream)JDK 21all before 21.0.13.121.0.13.1
OpenJDK (upstream)JDK 25all before 25.0.5.125.0.5.1
OpenJDK (upstream)JDK 27all before 27.0.1.127.0.1.1
OracleJava SE 8 Enterprise Performance Pack8u511b33-perf8u513
OracleGraalVM for JDK 17 / 21, GraalVM EE 21.317.0.21.0.3, 21.0.13.0.3, 21.3.20.0.317.0.21.1, 21.0.13.1, 21.3.20.1
AmazonCorretto 17 / 21 / 25 / 27earlier builds (Corretto 17 from 17.0.6)17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2 (released 17 Nov), 27.0.1.1.4
AzulZulu 17 / 21 / 25 / 27earlier builds17.70.201, 21.54.201, 25.38.201, 27.30.201
Eclipse AdoptiumTemurin 17 / 21 / 2517.0.21+9, 21.0.13+9, 25.0.5+8 and earlier are the latest releasesno fixed build as of 18 Nov. Use the JVM flag
Red HatRed Hat build of OpenJDK 17 / 21 / 25, RHEL 8 / 9 / 1017.0.6 and later, 21, 25fixes “expedited”, none released as of 18 Nov
Microsoft, BellSoft, SAPMicrosoft Build of OpenJDK, Liberica, SapMachineper vendorSapMachine .1 builds released 17 Nov without fix notes. Check vendor pages
Not affectedOpenJDK 8 and 11 (standard builds), OpenJDK 17 before 17.0.6, any JVM on ARM64 or on x86-64 without AVX-512 VBMI

Technical analysis

1. Where the bug lives

java.util.Base64.Decoder.decode() has a Java implementation and a HotSpot intrinsic, StubGenerator::generate_base64_decodeBlock() in src/hotspot/cpu/x86/stubGenerator_x86_64.cpp. Once C2 compiles the decode loop, calls go to the stub. On CPUs with AVX-512 VBMI the stub processes 256-byte blocks, then 64-byte blocks, then a final 1 to 63 byte tail using masked byte loads and stores (evmovdqub, the VMOVDQU8 instruction). A 64-bit mask register (k1) decides which of the 64 lanes are actually written.

Calif’s pseudocode for the tail mask:

// Zero High Bits Starting with Specified Bit Position
input_mask := bzhiq(-1, input_length)
output_len := (input_length / 4) * 3

// handle padding
if input[input_length - 1] == '=':
    output_len -= 1          // tail "=" -> 0 - 1 = -1
    input_mask >>= 1
    if input[input_length - 2] == '=':
        output_len -= 1      // tail "==" or "X==" -> -2
        input_mask >>= 1

output_mask := bzhiq(-1, output_len)
  • For a remaining tail of =, ==, X=, X==, XY= or ===, input_length / 4 is 0, so output_len starts at 0.
  • The padding branches then decrement it to -1 or -2.
  • BZHI only clears bits when the index is below 64. Treated as unsigned, -1 is far above 64, so nothing is cleared and output_mask stays 0xFFFFFFFFFFFFFFFF.
  • The final store then writes every lane:
evmovdqub(Address(dest, dp),   // destination: current position in the result array
          k1,                  // output_mask == -1: all 64 byte lanes enabled
          tmp,
          true,
          Assembler::AVX_512bit);

For the 65-byte input "A" * 64 + "=", Base64.Decoder sizes the result at ceil(65/4) * 3 - 1 = 50 bytes. After the first 64 characters decode to 48 bytes, the stub hits the = tail and stores 64 bytes at offset 48. Bytes 50 to 111 land past the end of the array. Calif says byte 0 of the write is fully controlled, byte 1 is 4-bit controlled, and the rest are fixed (offsets 48 to 63 of the store are always 0x9a). The stub returns the count it decoded, the Java code sees the invalid tail and throws, and the corruption stays behind.

On JDK 17 the 64-byte path needs a longer input to be reached, so the trigger becomes "A" * 128 + "=".

2. The fix

The upstream fix is JDK-8393212, committed to openjdk/jdk on 16 November 2026 as 5177a70 under the generic title “Base64 optimization improvements” (co-authored by Albert Mingkun Yang, reviewed by rhalade, mschoene, chagedorn and rcastanedalo):

--- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
@@ -3395,6 +3395,10 @@ address StubGenerator::generate_base64_decodeBlock() {
     __ BIND(L_finalBit);
     // Now have 1 to 63 bytes left to decode
 
+    // A padded Base64 tail shorter than one complete block is handled by Java.
+    __ cmpl(length, 4);
+    __ jcc(Assembler::less, L_bruteForce);
+
     // I was going to let Java take care of the final fragment
     // however it will repeatedly call this routine for every 4 bytes
     // of input data, so handle the rest here.

Any tail under 4 bytes now branches to L_bruteForce, which hands the remainder back to the scalar Java decoder. The masked store never sees output_len <= 0.

3. From a fixed overwrite to RCE

Calif describes the exploit as a heap-grooming problem rather than a universal payload:

  1. Warm. Send valid Base64 until C2 compiles the decode path and selects the intrinsic. Nothing is corrupted yet.
  2. Groom. Arrange for the decode output to sit just below a “writer” array, then a “reader” array, in a G1 region. Calif forces allocations off thread-local allocation buffers by sizing them, sprays several writer/reader pairs, and holds partial HTTP request bodies open so it controls when each allocation happens.
  3. Trigger. The overflow’s fixed bytes enlarge the writer’s length field.
  4. Leak. Writing through the enlarged writer grows the reader, whose contents the application echoes back. That is the Heartbleed-style heap disclosure: keys, tokens and PII in the Java heap.
  5. Repair and execute. Use the leaked originals to restore damaged headers, then turn the bounded write into arbitrary writes that reach the code cache and JVM hooks.

Calif lists two practical limits. Some grooming profiles need partial request bodies to reach the application, and a proxy that buffers whole bodies (nginx does by default) breaks their timing, though Calif’s Elasticsearch chain works from a single complete request and WebSocket frames bypass body buffering. Each target also needs its own profile, so this is not point-and-shoot. Calif says finding the bug took about an hour with an AI coding agent, and the first exploit two more.

4. Reproducing safely

Calif’s PoC keeps the overflow inside a 4096-byte array, so it is safe to run on a test host to check whether a given JVM and CPU combination is vulnerable:

Base64.Decoder decoder = Base64.getDecoder();
byte[] valid = "A".repeat(64).getBytes(StandardCharsets.US_ASCII);
byte[] malformed = ("A".repeat(64) + "=").getBytes(StandardCharsets.US_ASCII);
byte[] target = new byte[4096];
for (int i = 0; i < 200_000; i++) sink += decoder.decode(valid, target);   // warm up C2 + intrinsic
Arrays.fill(target, (byte) 0x5a);
try { decoder.decode(malformed, target); } catch (IllegalArgumentException expected) { }
// vulnerable JVM: bytes 50..111 of target are no longer 0x5a (62 bytes changed)

A vulnerable JVM prints REPRODUCED with changed=62 first=50 last=111.

5. Exploitation status

As of 18 November there are no confirmed reports of exploitation in the wild, and CVE-2026-114938 is not in CISA’s KEV catalog (Check Point, Tenable). CISA nonetheless issued an alert on 17 November urging immediate patching. The trigger and root cause are public, a PoC repository (ikow/java4shell-poc) appeared the same day, and Tenable reports that Kevin Breen of Immersive said he had a working exploit, adapted per application, with Tomcat Basic auth and the java-jwt library as pre-login routes. Check Point says independent teams had reproduced the crash and memory leak but not code execution by 18 November. No EPSS score had been published when we checked.

The same OpenJDK advisory fixes nine other Java SE CVEs (CVE-2026-114939 to CVE-2026-114947, CVSS 3.7 to 7.4) and a JavaFX WebView bug (CVE-2026-86144). None of those has public technical details yet. CVE-2026-114938 is the one with a public trigger and exploit chain.

IOCs

This is a vulnerability, not a malware campaign, so there are no network IOCs. Useful signals:

TypeIndicatorNotes
Input patternBase64 fields ending in a short padded tail after a multiple of 64 characters, e.g. "A" * 64 + "=" or "A" * 128 + "="the published trigger. Real exploits vary the bytes
Log patternBursts of IllegalArgumentException thrown from java.util.Base64$Decoderthe decoder rejects every trigger input after the overwrite has happened
HostUnexpected JVM crashes (hs_err_pid*.log files) on internet-facing servicesCalif says a misplaced overwrite can crash the JVM, and its exploit retries after misses
TrafficMany slow, partially sent HTTP requests from one source followed by a burst of completionsCalif’s remote grooming technique

Detection and remediation

# 1. Is this CPU affected? All four flags must be present.
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

# 2. Which Java runtimes are on this host (including bundled ones)?
find / -type f -name java -path '*/bin/*' 2>/dev/null | while read j; do echo "$j: $("$j" -version 2>&1 | head -1)"; done

# 3. Is the intrinsic enabled in a given JVM?
java -XX:+PrintFlagsFinal -version 2>/dev/null | grep -E 'UseBASE64Intrinsics|UseAVX '

# 4. Running JVMs and their versions
for p in $(pgrep -f java); do echo "$p $(readlink /proc/$p/exe)"; jcmd "$p" VM.version 2>/dev/null | sed -n 2p; done

# 5. Container images: report the JDK version in each image
docker images --format '{{.Repository}}:{{.Tag}}' | while read i; do
  echo "$i: $(docker run --rm --entrypoint sh "$i" -c 'java -version 2>&1 | head -1' 2>/dev/null)"; done

# 6. Kubernetes: find JVM workloads to patch or flag
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}' \
  | grep -iE 'jdk|jre|temurin|corretto|zulu|openjdk|keycloak|jenkins|jira|confluence|artifactory|solr|elasticsearch|kafka'

# 7. Logs: trigger attempts end in a Base64 decode exception
grep -rn -A3 'java.lang.IllegalArgumentException' /var/log/ 2>/dev/null | grep -c 'java.util.Base64\$Decoder'

# 8. JVM crash logs
find / -name 'hs_err_pid*.log' -newermt '2026-11-01' 2>/dev/null

Interim mitigation (requires a JVM restart, remove once patched):

# Preferred: turn off only the Base64 intrinsic
export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"

# Alternative listed by UC Berkeley's Information Security Office:
#   -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_decodeBlock

# Broader: disable AVX-512 entirely (x86-64 ONLY. ARM64 JVMs reject this flag and won't start)
#   -XX:UseAVX=2

For products that ship their own JRE (Atlassian, JFrog, Ping Identity, Elastic and others), apply the flag through the product’s JVM options file and follow the vendor’s update path rather than swapping the bundled runtime.

Credential rotation is only needed if you find signs of exploitation. Because a successful chain can read the Java heap, treat signing keys, session tokens and service credentials held in memory by an exploited JVM as exposed.

Timeline

Date (UTC)Event
2026-10-13JDK-8393212 fix authored in OpenJDK (commit author date)
2026-11-16 19:52Fix committed to openjdk/jdk as 5177a70
2026-11-17Oracle November 2026 Critical Security Patch Update and OpenJDK Vulnerability Advisory published. Calif publishes Java4Shell write-up and PoC. CISA alert issued
2026-11-17 ~20:00Amazon Corretto 17.0.21.1.2, 21.0.13.1.2 and 25.0.5.1.2 released
2026-11-17 21:53Disclosure posted to oss-security
2026-11-17 22:18CVE-2026-114938 published in NVD
2026-11-18Red Hat bulletin RHSB-2026-018 and CERT-EU advisory 2026-021. Temurin and Red Hat builds still pending. No confirmed in-the-wild exploitation

Calif’s previous disclosure, PHP2Shell, also found memory corruption in a language runtime’s native code and was exploited in the wild within weeks.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Use AI-native static analysis to find similar application vulnerabilities and generate review-ready fixes.

References