Java4Shell: an out-of-bounds write hidden in a JDK acceleration routine
On November 17, 2026, security research firm Calif Research disclosed a vulnerability code-named Java4Shell (CVE-2026-114938, "Write once, RCE everywhere"); OpenJDK published its advisory the same day, with fixes shipped in Oracle's November 2026 Critical Patch Update (CPU). CVSS 4.0 scores the vulnerability 9.2, CVSS 3.1 scores it 8.1.
The flaw sits in the hand-written x86-64 AVX-512 VBMI intrinsic that accelerates java.util.Base64 decoding in the OpenJDK HotSpot VM: when handling final padding, a mask computation underflows, and malformed input (for example, 64 'A' characters followed by a '=' pad character) produces a 62-byte out-of-bounds write on the heap. Base64 is among the most frequently invoked decoding operations in Java applications — HTTP Basic authentication headers, JWTs, API payloads and file-import parsing can all become entry points, so any team running Java services should take this seriously.
This article summarizes the version scope, trigger conditions, self-check commands and remediation guidance based on the OpenJDK advisory and the Oracle CPU notice, as of November 18, 2026.
A two-stage kill chain: JavaBleed memory disclosure, then RCE
The out-of-bounds write is dangerous because it can be choreographed into a complete attack chain. Stage one: the write corrupts the length field of an adjacent array object, so subsequent ordinary array reads spill neighboring heap memory — researchers named this disclosure primitive JavaBleed; session credentials, cryptographic keys and personal data can all be read out. Stage two: with the disclosure primitive in hand, an attacker constructs controlled linear writes and ultimately achieves remote code execution (RCE).
Exploitation requires all three preconditions at once: a JDK version within the affected range; an x86-64 CPU with AVX-512 VBMI support; and an attacker-controlled input reaching a hot, JIT-compiled java.util.Base64 decode site (pre- or post-authentication, depending on the application's exposure).
Version scope at a glance (per the OpenJDK advisory)
The CPU list covers more release lines than this CVE actually hits: the risk matrix only flags 17/21/25/27 — 8/11 were patched in this CPU for other CVEs.
| Release line | Affected range | Affected by this CVE | Recommended action |
|---|---|---|---|
| JDK 17 | 17.0.6 ≤ version < any 17.0.x build before the 2026-11-17 CPU (including 17.0.21 GA, e.g. Temurin 17.0.21+9) | Affected | Upgrade to a build from the 2026-11-17 CPU or later, and pin the version |
| JDK 21 / 25 / 27 | 21.0.13.0.3 / 25.0.5.0.3 / 27.0.1.0.3 and earlier (per the advisory) | Affected | Same as above |
| JDK 8 / 11 | 8u512 / 11.0.33 and earlier are also on this CPU's list | Not affected by this CVE | Follow the routine CPU cadence; no emergency needed |
| Fixed builds | Builds from the 2026-11-17 CPU or later | Not affected | Use as upgrade targets |
The architecture gate: only x86-64 with AVX-512 VBMI is exposed
Unlike most Java vulnerabilities, the first gate here is hardware, not version. The vulnerable path is hand-written x86-64 AVX-512 VBMI assembly, so only Intel Ice Lake and newer and AMD Zen4 and newer CPUs carry it. ARM64 — including Apple Silicon and ARM servers — has no such intrinsic, so an identically versioned JDK on ARM presents no exploitation surface for this CVE.
One pitfall: some cloud VMs do not expose AVX-512 features to guests, so host support does not guarantee guest visibility. Judge by running the checks on the machine itself, not by instance type or cloud documentation.
Three self-check steps, two commands
On every machine running Java services, confirm three things in order — it takes minutes:
- Architecture — run uname -m: aarch64/arm64 means architecturally immune, stop here; x86_64 continues to the next step.
- CPU features — run grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$': all four flags (avx512f, avx512bw, avx512vbmi, bmi2) present means the vulnerable path exists; any missing flag means architecturally immune.
- Actual JDK version — run java -version inside the container or application runtime (not the host default JVM), and compare against the table above.
Remediation: pin fixed builds; use mitigation only as a bridge
Interim mitigation (until you can upgrade): add -XX:-UseBASE64Intrinsics to the JVM, which disables the Base64 intrinsic and removes this exploitation path. The alternative -XX:UseAVX=2 also avoids the AVX-512 code path, but it fails JVM startup on ARM — use caution in mixed-architecture fleets.
Fix by upgrading: move runtimes to JDK builds from the 2026-11-17 CPU or later, and replace floating image tags (such as 17-jre) with pinned fixed builds while you are at it — floating tags leave different machines on different patch levels depending on when images were pulled, and that drift multiplies triage cost. Build-time JDKs in CI should move to the latest patch as well.
After upgrading: regression-test Base64-heavy features (authentication, import/export, report generation), and review access logs for anomalous decode requests (long repeated-character patterns) to assess exposure during the vulnerable window.
The ZhaoHeng view: turn "which hosts are exposed" into a routine asset question
The crux of triage — which hosts, what architecture, which JDK builds, which decode sites are reachable — is an asset and exposure-management question. ZhaoHeng, our AI security operations platform can fold JVM runtime version baselines, CPU instruction-set checks and decode-site exposure review into routine asset inventory, producing a per-host verdict list; for affected environments it supports interim mitigation rollout, log review during the upgrade window, and incident response — so the next advisory does not start from zero.
Want a full pass over your Java estate?
Zhaoxun offers JVM asset version baselining, architecture and exposure assessment, interim mitigation rollout, and incident response support.