Java4Shell: An OpenJDK Base64 Memory Bug Rated 9.2 (CVE-2026-114938)

Nov 19, 2026 · 6 min · Ajay Kumar

On 17 November 2026 the research firm Calif disclosed Java4Shell (CVE-2026-114938), a memory-corruption bug in the Base64 decoder of OpenJDK, the most common Java runtime. Under CVSS 4.0 it scores 9.2 of 10 (Critical). OpenJDK published an advisory and Oracle shipped patched builds in its November Critical Patch Update the same day. This is the second "once, everywhere" disclosure from the group this year, after PHP2Shell, and like that one it was found with AI help.

What happened

OpenJDK decodes Base64 with hand-written assembly on supported x86-64 chips, using AVX-512 VBMI instructions to process 64 bytes at a time. The routine that handles the final characters mishandles a padding = placed where valid Base64 never puts one: it computes a negative output length, which becomes a full 64-byte write. For a 65-character input (64 characters then =), OpenJDK allocates a 50-byte output array and writes 62 bytes past its end. Java then rejects the input as invalid, but by that point the neighbouring heap objects are already overwritten. The application's own input validation does not help, because the corruption happens inside the decoder before the application sees the data.

The simplest trigger, from Calif's write-up, is 64 A characters followed by = (128 on OpenJDK 17, where the fast path starts later). Calif turned the overwrite into a heap leak in the style of Heartbleed and then into remote code execution. From the disclosure, the demonstrated targets in default configurations were:

Reachability Products
Pre-auth RCE Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederate
Post-auth RCE Apache Kafka broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker
Client-side A Java program that opens a TLS connection to a malicious server, even with no service of its own

Calif says it found the bug and built the first working exploit in about three hours, using AI agents to drive the audit and the exploit chains, for under $200 in tokens. It calls this the "centaur hacker" method, the same framing in my post on AI-assisted vulnerability discovery. The weaponised per-product chains are being held back until people have patched.

Who is affected

Three conditions all have to be true, per the Calif and OpenJDK pages:

  1. Runtime: OpenJDK 17.0.6 or newer, including the builds derived from it: Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle OpenJDK, Oracle Java SE and Oracle GraalVM for JDK.
  2. CPU: x86-64 with AVX-512 VBMI. That means Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids or Granite Rapids, and AMD EPYC or Ryzen Zen 4 or newer. ARM64 is not affected (Graviton, Apple silicon, Ampere), because the vulnerable code is x86 assembly that ARM never runs.
  3. Input: the application decodes attacker-controlled Base64 with the standard java.util.Base64 decoder. Auth headers, JWTs, file uploads and WebAuthn values all qualify.

The affected OpenJDK source versions in the advisory are 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, 27.0.1.0.3 and earlier; the patched builds raise those. The CPU condition narrows the blast radius but not by much: most cloud x86 instance families since 2021 are Ice Lake or newer.

What changes for engineers

  • Patching the OS Java package is not enough. Many applications bundle their own JDK, and container images pin a JDK inside the image. Upgrading the host package does not touch those copies, and it does not replace a JVM that is already running. Every updated service needs a restart.
  • A WAF is a speed bump, not a fix. Cloudflare shipped managed rules that detect malformed Base64, enabled in Log mode by default because legitimate tokens can look similar. They do not see non-HTTP protocols (the Kafka broker), nested or compressed encodings, outbound TLS connections, or internal traffic that bypasses the edge. The only complete fix is updating the runtime.
  • Your inventory problem is now urgent. The hard part is not the patch, it is knowing every place a vulnerable JDK runs: base images, sidecars, CI runners, vendored appliances. That is an SBOM question, covered in SBOM Explained and the Syft how-to.

What I ran

My machine is ARM64 (Apple silicon, OpenJDK 21.0.7 Homebrew), which the advisory lists as not affected, so I could not reproduce the heap overwrite here. On an x86-64 Linux host you can check the CPU condition without running any Java:

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

If all four flags appear, the CPU meets the requirement. To find which JDKs are even in scope across your images, list their versions rather than trusting the host package:

# every java on the host and its real version
for j in $(/usr/bin/find / -name java -type f 2>/dev/null); do
  printf '%s -> ' "$j"; "$j" -version 2>&1 | head -1
done

I did not run the public trigger or any exploit code. The full patching workflow, including bundled JDKs and containers, is in my Java4Shell patching how-to.

What to do this week

  • Inventory every JDK, not every host. Scan container images and running pods for the Java version, not just the OS package. Treat anything at OpenJDK 17.0.6+ on x86 AVX-512 as in scope.
  • Patch and restart the internet-facing Java apps first: Keycloak, Jira, Confluence, Artifactory, Jenkins, PingFederate. These had demonstrated pre-auth RCE.
  • If you cannot patch immediately, add a JVM start flag that removes the vulnerable path: -XX:-UseBASE64Intrinsics (disables the accelerated Base64 code) or, on x86-64 only, -XX:UseAVX=2 (disables AVX-512). Both need a restart and may slow Base64-heavy workloads. They buy time; they do not replace the patch.
  • Turn Cloudflare's rules from Log to Block only after reviewing matches in Security Events, so you do not drop legitimate token traffic.

FAQ

Does Java4Shell affect ARM64 servers like Graviton or Apple silicon?

No. The vulnerable code is x86-64 assembly using AVX-512 VBMI instructions that ARM64 processors do not have. Graviton, Ampere and Apple silicon hosts are not affected, whatever JDK version they run. The bug requires both an affected OpenJDK (17.0.6 or newer) and an x86-64 CPU with AVX-512 VBMI.

Is upgrading my system's Java package enough to fix CVE-2026-114938?

Usually not. Applications that bundle their own JDK, and container images that ship a fixed JDK, keep the vulnerable runtime after a host package upgrade. A running JVM also keeps the old code until it restarts. You need to update every copy of the JDK and restart every service that uses one.

How was Java4Shell found, and does that matter for defenders?

Calif used AI agents (it names Codex) to audit OpenJDK's JIT, intrinsics and crypto code, then to build the exploit chains, reporting about three hours from bug to first working exploit for under $200. It matters because the same economics let attackers build per-product chains quickly once a technique is public, so the window between disclosure and exploitation is short.

Related: AI-Assisted Vulnerability Discovery in 2026, Vulnerability Management in 2026 and How to Scan Container Images with Trivy and Grype.

Spot an error or something out of date? Email me and I will fix it and log it on the corrections page.

I'm Ajay Kumar — I build and operate PandaStack, an open-source Firecracker microVM cloud for AI agents, and write about the infrastructure and tooling around it.

Need this kind of infrastructure work? See what I do or email hello@ajayk.sh.


Related