---
title: "Java4Shell: OpenJDK Base64 Heap Overflow Enables RCE"
url: https://erroneo.us/security/briefs/java4shell-jdk-base64-rce-cve-2026-114938/
description: "Java 17+ Base64 decoder bug on AVX-512 VBMI x86 CPUs allows pre-auth RCE. Fixed in 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1. Patch or set the flag now."
type: security-brief
section: "Security Digest"
date_published: 2026-11-17
date_modified: 2026-11-19
publisher: erroneo.us
author: erroneo.us Security Desk
verdict: "Act now"
cves: ["CVE-2026-114938"]
severity: "critical"
exploited: "public-poc"
kev: false
license: All rights reserved. Quote with attribution and a link.
---

# Java4Shell: OpenJDK Base64 Heap Overflow Enables RCE

**Verdict: Act now.** If you run Java 17 or later on recent Intel or AMD servers, patch today or set -XX:-UseBASE64Intrinsics now: the bug is trivial to trigger, researchers showed pre-auth RCE in default Jenkins, Jira, Confluence and Keycloak, and full exploits already circulate privately.

- **Who must act:** Anyone running OpenJDK-based Java 17.0.6 or later (any vendor build) on x86-64 CPUs with AVX-512 VBMI, especially internet-facing services, identity servers and CI systems, and appliances or containers that bundle such a JRE.
- **Who can relax:** Java 8 and Java 11 users (except Oracle's 8u Performance Pack), and JVMs on ARM64 or on x86-64 CPUs that lack the avx512vbmi flag; patch on your normal cycle anyway.
- **Affected:** OpenJDK 17.0.6 through 17.0.21 (17.0.21.0.3 and earlier); OpenJDK 21 through 21.0.13 (21.0.13.0.3 and earlier); OpenJDK 25 through 25.0.5 (25.0.5.0.3 and earlier); OpenJDK 27 through 27.0.1 (27.0.1.0.3 and earlier); 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; Oracle GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3; GraalVM Enterprise 21.3.20.0.3; Only on x86-64 CPUs with avx512f, avx512bw, avx512vbmi and bmi2 (Calif: Intel Xeon Ice Lake and newer, AMD Zen 4 and newer)
- **Fixed:** OpenJDK and Eclipse Temurin 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4; Oracle JDK 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 (Nov 17, 2026); Amazon Corretto 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4; Red Hat build of OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1; RHEL 8, 9 and 10 java-17/21/25-openjdk errata (RHSA-2026:100563 to 100572); Ubuntu openjdk-17/21/25/27 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4 (USN-9155-1 to USN-9158-1); Debian trixie openjdk-21 21.0.13.1+2-1~deb13u1 (DSA-6639-1) and openjdk-25 25.0.5.1+2-1~deb13u1 (DSA-6640-1)
- **CVEs:** CVE-2026-114938
- **CISA KEV:** no · **Exploitation:** Public proof-of-concept

## What to do

1. Inventory every Java 17+ runtime, including JREs bundled in vendor apps, appliances and container images, and note which hosts have AVX-512 VBMI CPUs.
2. Upgrade to 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1 from your JDK vendor or distribution, then restart every JVM.
3. Where you cannot patch today, start the JVM with -XX:-UseBASE64Intrinsics (for example via JAVA_TOOL_OPTIONS) and restart it.
4. Patch internet-facing identity, CI and collaboration servers first: Keycloak, Jenkins, Jira, Confluence, Artifactory and PingFederate are named as pre-auth RCE targets.
5. Rebuild container images on fixed base images; Temurin images reach Docker Hub only after all binaries for a version are published.
6. Watch for vendor updates from appliances and products that ship their own JRE, such as Red Hat's Keycloak and JBoss EAP images, which Red Hat lists as affected.

### How to check if you are affected

- Check the running version and flag on each JVM: java -version, and jcmd <pid> VM.flags -all | grep UseBASE64Intrinsics.
- Check the CPU on Linux: grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$' must print all four flags for the host to be exposed.
- Look for unexpected JVM crashes since Nov 17 (hs_err_pid*.log files, restarts in service logs), which CISA lists as an indicator.
- Review exposed Java services for unexpected child processes, new files or outbound connections, and rotate credentials and keys held in memory if a vulnerable instance faced the internet.

## What happened

On November 17, 2026, security firm [Calif](https://calif.io/java4shell) disclosed Java4Shell, CVE-2026-114938. It is memory corruption in HotSpot's x86-64 Base64 decoder intrinsic, the hand-written assembly fast path behind `java.util.Base64` decoding on CPUs with AVX-512 VBMI. Calif says the bug "sits in the hand-rolled assembly code that handles the final few characters." When the input ends in padding, an output length underflows to -1 or -2 and the write mask becomes all ones. A 64-byte store then overruns a 50-byte buffer by 62 bytes. The trigger is tiny: 64 `A` characters followed by `=`, or 128 on JDK 17. The decoder rejects the input afterward, but neighboring heap objects may already be corrupted.

The [OpenJDK advisory](https://openjdk.org/groups/vulnerability/advisories/2026-11-17) and Oracle's out-of-band [November Critical Security Patch Update](https://www.oracle.com/security-alerts/cspunov2026.html) shipped the same day. Oracle credits Quang Luong of Calif.io and Albert Yang, and Calif says Luong found the bug with OpenAI's Codex. [CISA](https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching) issued an alert warning that crafted Base64 input "could crash the JVM and allow for unauthenticated remote code execution." The [fix](https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b), which [Solar Designer](https://www.openwall.com/lists/oss-security/2026/11/19/5) posted to oss-security, adds four lines that send short padded tails to the plain Java code path.

## Who is affected

Two conditions must both hold. The first is the software: OpenJDK 17.0.6 or later on the 17, 21, 25 or 27 lines, before the November fixes, from any vendor. Calif names Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat and Oracle builds. Oracle also lists its Java SE 8u511b33-perf build and GraalVM. [Red Hat](https://access.redhat.com/security/cve/cve-2026-114938) and [Adoptium](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell) say regular Java 8 and 11 lack the code and are not affected. The second is the hardware: an x86-64 CPU with the `avx512f`, `avx512bw`, `avx512vbmi` and `bmi2` flags. Calif lists Intel Xeon Ice Lake and newer and AMD Zen 4 and newer. ARM64 is not affected.

Fixes are out. OpenJDK and Temurin builds are 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2 and 27.0.1.1+4. Oracle released JDK [21.0.13.1](https://www.oracle.com/java/technologies/javase/21-0-13-1-relnotes.html), 17.0.21.1, 25.0.5.1 and 27.0.1.1. [Corretto](https://github.com/corretto/corretto-27/blob/27.0.1.1.4/CHANGELOG.md) shipped 27.0.1.1.4 and matching 17, 21 and 25 builds. Red Hat shipped RHEL 8, 9 and 10 errata by November 19, and [Ubuntu](https://ubuntu.com/security/CVE-2026-114938) fixed openjdk-17, -21, -25 and -27. The [Debian tracker](https://security-tracker.debian.org/tracker/CVE-2026-114938) shows trixie fixed but bookworm's openjdk-17 still vulnerable as of November 19.

## Do you really need to act?

**Yes, if you run Java 17 or later on recent x86 servers.** Oracle scores the flaw 8.1 with high attack complexity. Red Hat scores it 9.8 and rates it Critical, citing working exploits against widely deployed applications. Calif says it achieved RCE in default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate before authentication, and in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker after login. Any feature that decodes attacker-supplied Base64 can reach the bug, and Calif names authentication and file uploads as examples.

What keeps this short of a mass event so far: Calif published only a bounded trigger and is withholding application exploits. [Censys](https://censys.com/advisory/cve-2026-114938/) reported no confirmed successful exploitation as of November 18, but monitoring providers saw probing, and VulnCheck says its customers have had a full RCE exploit since the evening of November 17. CISA's own assessment recorded no exploitation, and the CVE was not in KEV as of November 19. Assume that will change quickly.

## What to do now

1. Inventory Java 17+ runtimes, including JREs inside vendor products, appliances and images, which CISA notes may not show up as separate entries.
2. Upgrade to the fixed builds above and restart every JVM. On Ubuntu, for example: `apt update && apt install openjdk-21-jre-headless`. On RHEL: `dnf update java-21-openjdk`.
3. If you cannot patch today, add `-XX:-UseBASE64Intrinsics`, for example `JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics`, and restart. On x86-64 only, `-XX:UseAVX=2` also avoids the AVX-512 path, but Calif warns it stops JVMs on ARM from starting.
4. Rebuild containers from refreshed base images. Adoptium publishes Temurin images to Docker Hub only after every binary for a version is ready.
5. Track advisories for products that bundle their own JRE. Red Hat lists Keycloak and JBoss EAP images as affected.

## How to tell if you were hit

Confirm exposure first: `java -version` for the build, `jcmd <pid> VM.flags -all | grep UseBASE64Intrinsics` for a running JVM, and Calif's CPU check, `grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'`, which must print all four flags. CISA advises watching for unexpected JVM crashes, rogue runtimes and suspicious Java processes, so check for `hs_err_pid*.log` files and unplanned restarts since November 17. Calif also describes a heap-disclosure primitive. If an exposed, unpatched instance held credentials, private keys or session tokens, rotate them.

## Timeline

- Oct 13, 2026 — Date on the OpenJDK fix commit, 8393212.
- Oct 22, 2026 — Oracle reserves CVE-2026-114938.
- Nov 17, 2026 — Calif discloses Java4Shell. OpenJDK, Oracle and Corretto ship fixes, and CISA issues an alert.
- Nov 18, 2026 — Red Hat ships fixed OpenJDK builds and Ubuntu publishes USN-9155-1 to USN-9158-1. Adoptium starts Temurin releases, and Censys reports no confirmed exploitation.
- Nov 19, 2026 — RHEL 8, 9 and 10 errata available, and the fix commit is posted to oss-security.

## Sources

1. [Calif — Java4Shell (CVE-2026-114938)](https://calif.io/java4shell)
2. [OpenJDK — Vulnerability Advisory 2026/11/17](https://openjdk.org/groups/vulnerability/advisories/2026-11-17)
3. [Oracle — Critical Security Patch Update Advisory, November 2026](https://www.oracle.com/security-alerts/cspunov2026.html)
4. [CVE record — CVE-2026-114938](https://www.cve.org/CVERecord?id=CVE-2026-114938)
5. [CISA — Critical Java Vulnerability Requires Immediate Patching](https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching)
6. [OpenJDK — commit 5177a70b: 8393212 Base64 optimization improvements](https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b)
7. [Solar Designer via oss-security — Re: CVE-2026-114938 (fix commit)](https://www.openwall.com/lists/oss-security/2026/11/19/5)
8. [Red Hat — CVE-2026-114938](https://access.redhat.com/security/cve/cve-2026-114938)
9. [Adoptium — Eclipse Temurin guidance for CVE-2026-114938](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell)
10. [Oracle — JDK 21.0.13.1 Release Notes](https://www.oracle.com/java/technologies/javase/21-0-13-1-relnotes.html)
11. [Amazon Corretto — Corretto 27 changelog (27.0.1.1.4)](https://github.com/corretto/corretto-27/blob/27.0.1.1.4/CHANGELOG.md)
12. [Ubuntu — CVE-2026-114938](https://ubuntu.com/security/CVE-2026-114938)
13. [Debian security tracker — CVE-2026-114938](https://security-tracker.debian.org/tracker/CVE-2026-114938)
14. [Jan Schaumann via oss-security — CVE-2026-114938: OpenJDK pre-auth RCE via memory-corruption in Base64 decoder](https://www.openwall.com/lists/oss-security/2026/11/17/31)
15. [Censys — Advisory: OpenJDK Remote Code Execution (Java4Shell)](https://censys.com/advisory/cve-2026-114938/)

---
Source page: https://erroneo.us/security/briefs/java4shell-jdk-base64-rce-cve-2026-114938/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
