---
title: "Java4Shell (CVE-2026-114938): affected Java versions, the patch, mitigations"
description: "Java4Shell is a heap buffer overflow in the OpenJDK HotSpot Base64 decoder, CVE-2026-114938, on x86-64 CPUs with AVX-512 VBMI. Java 17.0.6 through 17.0.21.0.3, 21 through 21.0.13.0.3, 25 through 25.0.5.0.3 and 27 through 27.0.1.0.3 are affected; fixed in 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. No exploitation confirmed as of 23 November 2026. Affected versions, the four-line patch, how to check a host, and what to do until you can upgrade."
cve: [CVE-2026-114938]
published: 2026-11-24
updated: 2026-11-24
canonical: https://yeet.cx/cve/CVE-2026-114938
---

# Java4Shell (CVE-2026-114938)

Java4Shell is the name for CVE-2026-114938, a heap buffer overflow in the Base64 decoder that the openJDK hotspot JVM uses on x86-64 CPUs with AVX-512 VBMI: a malformed Base64 string sent to a service on java 17, 21, 25 or 27 makes the JVM write past the end of an array, which can crash the service and, with an exploit built for the specific application, leak memory or run code without a login.

**what to do:** upgrade your JDK to **17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1**, restart every JVM and rebuild every image that bundles a JDK. 17.0.21 is not the fix: 17.0.21 through 17.0.21.0.3 are vulnerable. if you cannot upgrade today, start each JVM with `-XX:-UseBASE64Intrinsics`.

- **severity:** 8.1 high (CVSS 3.1)
- **access needed:** network, no login (anyone who can send Base64 to a java service that decodes it, when that service runs on an x86-64 CPU with AVX-512 VBMI)
- **exploited:** none confirmed, not on CISA's KEV list as of 23 nov 2026; greynoise on 23 nov 2026: 7 IPs, 261 requests, 0 successful intrusions; EPSS 0.573 on 23 nov 2026
- **install:** openJDK 27.0.1.1, 25.0.5.1, 21.0.13.1 or 17.0.21.1, released 17 nov 2026

## what is Java4Shell?

Java4Shell (also written Java2Shell) is a memory-corruption bug in the JVM itself, not in a library or a framework. on x86-64 CPUs with AVX-512 VBMI, hotspot decodes Base64 with a hand-written AVX-512 routine, `generate_base64_decodeBlock()` in `stubGenerator_x86_64.cpp`. when the input ends in padding that valid Base64 never has, the routine's last step computes a negative output length, and that becomes a full 64-byte write into an output array sized for the real result. [cloudflare](https://blog.cloudflare.com/java4shell-waf-protection/) and [calif](https://calif.io/java4shell) count 62 bytes written past the end of the array; check point alone says 62 or 63, depending on the padding. by calif's analysis the attacker does not control the bytes that land outside the array. java rejects the input and throws an exception afterwards, when the neighbouring heap memory has already been overwritten.

every one of these has to hold. the JVM is hotspot from an affected openJDK-based build of java 17, 21, 25 or 27. the CPU is x86-64 and reports `avx512f`, `avx512bw`, `avx512vbmi` and `bmi2`: calif names intel xeon ice lake, sapphire rapids, emerald rapids and granite rapids, and AMD EPYC and ryzen on zen 4 or newer, and [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) adds the cloud families "AWS C6i/M6i/R6i and C7i/M7i/R7a, GCP C3/C3D/C4/C4D/N4/N4D/M3/M4, and Azure Dsv5/Dsv6/Dasv6/Dasv7". the Base64 intrinsics are on, which is the default on those CPUs. the application passes data an attacker controls to `java.util.Base64`. [oracle](https://www.oracle.com/security-alerts/cspunov2026.html) rates it exploitable over the network without authentication, by supplying data to the API "such as through a web service"; whether the decode happens before login depends on the application. ARM64, x86-64 CPUs without AVX-512 VBMI, IBM semeru (OpenJ9) and graalVM or mandrel native executables are not affected.

what is confirmed differs by claim. the out-of-bounds write reproduces: calif published a proof of concept, [vulncheck](https://www.vulncheck.com/blog/java4shell) reproduced it on ice lake hardware, and [chainguard](https://www.chainguard.dev/unchained/java4shell-how-a-malformed-base64-string-breaks-the-jvm-on-avx-512) found the same bug on its own by fuzzing. a remote crash is confirmed too: vulncheck brought a service down with a burst of requests, and [elastic](https://discuss.elastic.co/t/391703) says unauthenticated actors can cause denial of service in its products. code execution before login, in default configurations of keycloak, jira, confluence, artifactory, jenkins and pingfederate, is calif's claim, with the per-product exploit chains held back; no vendor has confirmed it on its own product. elastic confirms code execution on elasticsearch for an authenticated user with at least read access. check point reported on 18 november 2026 that several teams had reproduced crashes and the memory leak in the lab, "though not code execution". calif's own limit: "There is no universal payload", and "Every target needs a bespoke profile."

the score this page shows is oracle's, because oracle is the CNA: 8.1, with attack complexity high. others score it higher. red hat gives 9.8 with attack complexity low. amazon linux gives 8.8, with complexity low but low privileges required. calif gives 9.2 under CVSS 4.0 and atlassian cites 9.2, neither with a vector. SUSE and ubuntu repeat oracle's 8.1, and NVD has published no score of its own. the three vectors agree that the impact is high; they disagree on how hard the attack is and on whether it needs an account. the openJDK project's own advisory could not be read for this page; corretto's changelog, which mirrors its table, prints 8.1. the weakness class differs too: CISA's entry in the CVE record and github say CWE-122, red hat says CWE-787, and oracle assigns none.

### CVE-2026-114938

- advisory: Oracle Critical Security Patch Update Advisory - November 2026 ([cspunov2026](https://www.oracle.com/security-alerts/cspunov2026.html))
- what goes wrong: when Base64 input ends in padding where valid Base64 never puts it, the AVX-512 decode routine computes a negative output length for the last fragment. that length turns into a full 64-byte write into an array sized for the real output, so the write runs past the array's end. java then rejects the input and throws an exception, after the neighbouring heap memory has been overwritten.
- how it is reached: any value the application hands to `java.util.Base64`. red hat lists HTTP basic credentials, SAML artifacts, CSRF tokens and MIME encoded words, which are "routinely decoded before authentication completes". the value has to be long enough to enter the AVX-512 path and end in a padded tail shorter than four characters, and the JVM has to have compiled the decoder with its C2 compiler, which a busy service does on its own.
- confirmed on: the out-of-bounds write: calif's proof of concept, vulncheck on ice lake hardware, and chainguard by fuzzing. a remote crash: vulncheck in its own testing, and elastic for its own products. code execution before login in default configurations of keycloak, jira, confluence, artifactory, jenkins and pingfederate is calif's claim alone, with the exploit chains held back. the one vendor confirmation of code execution is elastic's, for an elasticsearch user who is logged in with at least read access.
- CVSS 3.1: 8.1 high, scored by oracle (the CNA), `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CVSS 3.0: 9.8 critical, scored by red hat, `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CVSS 3.1: 8.8 important, scored by amazon linux, `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CVSS 3.1: 8.1 high, scored by SUSE and ubuntu, repeating oracle's vector, `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CVSS 4.0: 9.2 critical, scored by calif (the finder), `no vector published`
- CVSS, version not stated: 9.2 critical, scored by atlassian, `no vector published`

weakness classes: CWE-122 Heap-based Buffer Overflow, CWE-787 Out-of-bounds Write.

## is Java4Shell being exploited?

### timeline

- 2026-06-09 23:51 UTC: `sundarms` opens adoptium-support issue 1480 about a JVM crash in the parallel garbage collector. it is the first public report of the bug. ([adoptium-support](https://github.com/adoptium/adoptium-support/issues/1480))
- 2026-09-09 09:12 UTC: `albertnetymk` opens openjdk/jdk pull request 32781 with a fix and a public description of what triggers the bug. it is closed without merge on 4 november 2026. ([openjdk/jdk](https://github.com/openjdk/jdk/pull/32781))
- 2026-10-13: author date of the fix commit by Tobias Hartmann. the 27 branch copy is dated the next day. ([openjdk/jdk](https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b))
- 2026-10-24: Quang Luong of calif finds the bug and reports it to oracle with a proof of concept against elasticsearch that needs a login. oracle had reserved the CVE id two days earlier. chainguard dates calif's find to 30 october; calif's own date is used here. ([calif](https://calif.io/java4shell))
- 2026-11-13: oracle tells calif the bug is fixed and that the patch will be released at 1 p.m. pacific time on 17 november. chainguard says it found the bug on its own by fuzzing late that week and reported it to oracle. ([calif](https://calif.io/java4shell))
- 2026-11-16 19:52 UTC: the fix is committed to the public openjdk/jdk mainline, titled "8393212: Base64 optimization improvements". the 17, 21 and 25 branch copies are dated 12 november. ([openjdk/jdk](https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b))
- 2026-11-17 21:00 UTC: oracle publishes its critical security patch update and the fixed builds 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1 are released. calif publishes its write-up, the CVE record goes public at 21:32 UTC, and CISA issues an alert the same day. ([oracle](https://www.oracle.com/security-alerts/cspunov2026.html))
- 2026-11-18: temurin's github releases for all four lines are published between 10:08 and 20:39 UTC, and their linux x64 binaries are all up by 21:08 UTC. microsoft's build, ubuntu's USN-9155 to USN-9158, red hat's portable builds and cloudflare's managed rules arrive the same day. ([adoptium](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell))
- 2026-11-19: red hat publishes errata for RHEL 8, 9 and 10. ([red hat](https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2026-114938.json))
- 2026-11-23 21:18 UTC: greynoise counts 7 IPs, 261 Java4Shell-shaped requests and 0 successful intrusions since 17 november. CISA's KEV catalog version 2026.11.23 does not list the CVE. ([greynoise](https://java4shell.events.greynoise.io/))

no exploitation is confirmed as of 23 november 2026. the CVE is not in CISA's [known exploited vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) (catalog version 2026.11.23), and CISA's own entry in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-114938) rated exploitation "none" on 17 november 2026. [EPSS](https://api.first.org/data/v1/epss?cve=CVE-2026-114938) is 0.573, in the 99th percentile, as of 23 november 2026.

probing has started. [greynoise](https://java4shell.events.greynoise.io/), last updated 23 november 2026 at 21:18 UTC, counts 7 IPs sending Java4Shell-shaped Base64 since 17 november, 261 such requests and 0 successful intrusions: "No confirmed successful exploitation against GreyNoise gridpoints yet." it classes all seven IPs as malicious. the requests went to paths such as `/login.action`, `/rest/api/space`, `/actuator/env`, `/api/json` and `/crumbIssuer/api/json`. a separate cluster of four IPs sends the user agent `java4shell-scanner/1.0`.

vendors reported the same picture in the first days. [cloudflare](https://blog.cloudflare.com/java4shell-waf-protection/) said on 18 november 2026 that it had seen "no indication so far that Java4Shell was exploited on Cloudflare infrastructure". [check point](https://blog.checkpoint.com/security/java4shell-cve-2026-114938-check-your-java-services-now/), as of 18 november 2026, was "not aware of confirmed exploitation" and added that "a triggering input has been visible since September 9, 2026". [elastic](https://discuss.elastic.co/t/391703) reported "no indication of exploitation" in its own cloud services.

working exploits exist in private, as of 23 november 2026. calif is holding its per-product chains back "until everyone has had a chance to upgrade". [vulncheck](https://www.vulncheck.com/blog/java4shell) says a full RCE exploit has been available to its customers since 17 november 2026. two public proof-of-concept repositories stop short of that: going by their READMEs, one demonstrates the out-of-bounds write only and the other a staged path from memory corruption to heap disclosure, and neither claims a working exploit for a product.

vulncheck's forecast, as read on 23 november 2026, is targeted use: it does not expect the bug to be "easily or widely exploitable", but says "adversaries are likely to find narrow but functional paths to RCE in specific applications". no actor has been named.

## the yeet programmable firewall

the upgrade is the fix. until it lands, the yeet programmable firewall blocks the request on the host, in the network driver, with no restart.

[book a demo](https://yeet.cx/demo), or [learn more](https://yeet.cx/discover/programmable-firewall) about the yeet programmable firewall.

## which java versions are affected, and which fix it?

four release lines are affected: 17 (from 17.0.6), 21, 25 and 27. the fixed builds were released on 17 november 2026: 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. the last vulnerable builds carry four-part numbers (17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, 27.0.1.0.3), so a version that starts with 17.0.21 is not automatically fixed. openJDK 11 and 8 do not contain the vulnerable code and are not affected, per [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) and [adoptium](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell); the one exception is oracle java SE `8u511b33-perf`, which [oracle](https://www.oracle.com/security-alerts/cspunov2026.html) lists as affected. oracle's advisory prints affected versions only, so the fixed build of that one was not found. no fixed build exists for the end-of-life feature releases 18, 19, 20, 22, 23, 24 and 26, and [amazon linux](https://explore.alas.aws.amazon.com/CVE-2026-114938.html) marks its 22, 23, 24 and 26 corretto packages “No Fix Planned”; check point's advice is to move them to a fixed build and not to assume they are safe.

| branch | vulnerable | first fixed | install now |
| --- | --- | --- | --- |
| openJDK 27 | 27 GA to 27.0.1.0.3 | 27.0.1.1 | 27.0.1.1 |
| openJDK 25 | 25 GA to 25.0.5.0.3 | 25.0.5.1 | 25.0.5.1 |
| openJDK 21 | 21 GA to 21.0.13.0.3 | 21.0.13.1 | 21.0.13.1 |
| openJDK 17 | 17.0.6 to 17.0.21.0.3 | 17.0.21.1 | 17.0.21.1 |

- openJDK 17: 17.0.21, 17.0.21.0.2 and 17.0.21.0.3 are vulnerable. only 17.0.21.1 carries the fix, so read the fourth field of the version. 17.0.0 through 17.0.5 are not affected, because the AVX-512 decoder was backported in 17.0.6; they are superseded, so move to 17.0.21.1 anyway.

### distribution packages

most java comes from a vendor build or a distribution package. every one listed here moved to the fixed upstream version, so `java -version` shows the fix, and you still have to restart the JVMs. two exceptions were found. azul's subscriber-only builds 17.69.204, 21.53.202 and 25.37.202 keep older JDK numbers (17.0.20.1.201, 21.0.12.1.201, 25.0.4.1.201) and ship in the release whose CVE table lists this CVE, but no per-build confirmation was found. and a product can ship the JVM flag in place of a new JDK, as elastic does for logstash. SUSE published its updates on 20 november 2026 and still shows its overall state as pending. bellsoft liberica and SAP sapmachine are on calif's affected list; no fixed versions were found for them.

| distribution | package | first fixed package | version number | advisory |
| --- | --- | --- | --- | --- |
| eclipse temurin | JDK 17, 21, 25, 27 | 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4 | moves to the fixed release | [adoptium](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell) |
| amazon corretto | JDK 17, 21, 25, 27 | 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4 | moves to the fixed release | [corretto 17 changelog](https://github.com/corretto/corretto-17/blob/develop/CHANGELOG.md) |
| azul zulu | zulu 17, 21, 25, 27 | 17.70.201, 21.54.201, 25.38.201, 27.30.201 (CA); 17.70.202, 21.54.202, 25.38.202, 27.30.202 (SA) | moves to the fixed release | [azul release notes](https://docs.azul.com/core/release-notes) |
| microsoft build of openJDK | JDK 17, 21, 25 | 17.0.21.1, 21.0.13.1, 25.0.5.1 | moves to the fixed release | [microsoft](https://devblogs.microsoft.com/java/java-openjdk-november-2026-critical-patch-update/) |
| debian 13 (trixie) | openjdk-21, openjdk-25 | 21.0.13.1+2-1~deb13u1, 25.0.5.1+2-1~deb13u1 | moves to the fixed release | [DSA-6639-1, DSA-6640-1](https://security-tracker.debian.org/tracker/CVE-2026-114938) |
| debian 12 (bookworm) | openjdk-17 | 17.0.21.1+2-1~deb12u1 | moves to the fixed release | [DLA-4917-1](https://security-tracker.debian.org/tracker/CVE-2026-114938) |
| ubuntu 24.04 | openjdk-17, openjdk-21, openjdk-25 | 17.0.21.1+2-1~24.04.1, 21.0.13.1+2-1~24.04.1, 25.0.5.1+2-1~24.04.1 | moves to the fixed release | [USN-9155-1, USN-9156-1, USN-9157-1](https://ubuntu.com/security/CVE-2026-114938) |
| ubuntu 22.04 | openjdk-17, openjdk-21, openjdk-25 | 17.0.21.1+2-1~22.04.1, 21.0.13.1+2-1~22.04.1, 25.0.5.1+2-1~22.04.1 | moves to the fixed release | [USN-9155-1, USN-9156-1, USN-9157-1](https://ubuntu.com/security/CVE-2026-114938) |
| RHEL 10 | java-21-openjdk, java-25-openjdk | 1:21.0.13.1.2-1.2.el10, 1:25.0.5.1.2-1.1.el10 | moves to the fixed release | [RHSA-2026:100568, RHSA-2026:100572](https://access.redhat.com/security/cve/CVE-2026-114938) |
| RHEL 9 | java-17-openjdk, java-21-openjdk, java-25-openjdk | 1:17.0.21.1.2-2.2.el9, 1:21.0.13.1.2-1.2.el9, 1:25.0.5.1.2-1.1.el9 | moves to the fixed release | [RHSA-2026:100564, RHSA-2026:100567, RHSA-2026:100571](https://access.redhat.com/security/cve/CVE-2026-114938) |
| RHEL 8 | java-17-openjdk, java-21-openjdk | 1:17.0.21.1.2-2.1.el8, 1:21.0.13.1.2-1.1.el8 | moves to the fixed release | [RHSA-2026:100563, RHSA-2026:100567](https://access.redhat.com/security/cve/CVE-2026-114938) |
| SLE 15 | java-17-openjdk, java-21-openjdk, java-25-openjdk | 17.0.21.1-150400.3.79.1, 21.0.13.1-150600.3.40.1, 25.0.5.1-150700.15.23.1 | moves to the fixed release | [SUSE-SU-2026:5385-1, 5393-1, 5394-1](https://www.suse.com/security/cve/CVE-2026-114938.html) |
| amazon linux 2, 2023, 2027 | java-17/21/25/27-amazon-corretto | see the advisory | moves to the fixed release | [ALAS2-2026-4123, ALAS2023-2026-3478 to 3481, ALAS2027-2026-371 to 374](https://explore.alas.aws.amazon.com/CVE-2026-114938.html) |

## how do I check whether my JDK is patched?

two questions decide exposure: does the CPU have the feature, and is the JVM that serves traffic an affected build. check the JVM that is running, not the `java` on your shell's path. a JDK bundled inside a product does not appear in the operating system's package list. apart from the package queries, each command below is one a named vendor publishes.

### check the CPU

the bug fires only on x86-64 CPUs that report `avx512f`, `avx512bw`, `avx512vbmi` and `bmi2`. the linux flag is spelled `avx512vbmi`, with no underscore; a search for `avx512_vbmi` matches only `avx512_vbmi2`, a different feature. calif's command must print all four flag names. red hat's ends with a one-word verdict on the hardware. keycloak's prints the line below when the VBMI flag is present. in a container or VM, run it on the node, and run it again after a cloud resize, which can move a workload onto an affected CPU.

four flags (calif):

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

verdict (red hat):

```sh
grep '^flags[[:blank:]]' /proc/cpuinfo | awk -vRS='[[:space:]]+' -vORS=' ' '/^(avx512f|avx512bw|avx512vbmi|bmi2)$/ && !flags[$0]++; END{printf ": %s hardware!\n", length(flags)==4?"VULNERABLE":"Unaffected"}'
```

VBMI only (keycloak):

```sh
grep -m1 '^flags' /proc/cpuinfo | grep -qw avx512vbmi && echo 'AVX-512 VBMI available'
```

- VBMI present: `AVX-512 VBMI available`
- VBMI absent: `no output`

### read the java version

run it with the java executable that starts the service. fixed builds report 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1 (corretto adds a field: 17.0.21.1.2 and so on). anything from 17.0.6 through 17.0.21.0.3, any 21 up to 21.0.13.0.3, any 25 up to 25.0.5.0.3 and any 27 up to 27.0.1.0.3 is vulnerable. the line below is the vulnerable temurin 25.0.5+8 inside `jenkins/jenkins:lts-jdk25`, from the [jenkins post](https://www.jenkins.io/blog/2026/11/18/mitigating-java4shell/); no vendor page prints the output of a fixed build. the container forms start a separate java process, so they identify the bundled runtime, not the flags of the JVM that is already running.

host:

```sh
java -version
```

image:

```sh
docker run --rm --entrypoint java <image> -version
```

container:

```sh
docker exec <container> java -version
```

kubernetes:

```sh
kubectl exec <pod> -c <container> -- java -version
```

- vulnerable: `openjdk version "25.0.5" 2026-10-20 LTS`

### list the JVMs that are running

an upgraded package does not replace a JVM that is already running, so ask each process. `jcmd -l` lists the JVM process IDs, and `VM.version` should show a fixed build ([check point](https://blog.checkpoint.com/security/java4shell-cve-2026-114938-check-your-java-services-now/)). `jcmd` sees only the JVMs of its own user, so run it as each service account or as root. a JVM still on an old build needs a restart, and a container needs a rebuilt image.

list:

```sh
jcmd -l
```

version:

```sh
jcmd <pid> VM.version
```


### check the distribution package

the distributions rebased to the fixed upstream version, so the package version is enough and no changelog check is needed. compare it with the table above, then restart: per ubuntu, "you need to restart any running Java applications" after the update.

debian, ubuntu:

```sh
dpkg -l 'openjdk-*'
```

RHEL:

```sh
rpm -qa 'java-*-openjdk*'
```


### confirm the mitigation flag is live

for hosts that run on `-XX:-UseBASE64Intrinsics` until the upgrade. a variable in the environment proves nothing: per [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018), "the running JVM must report the flag". the expected line is keycloak's, which notes that the whitespace between fields may differ.

```sh
jcmd <pid> VM.flags -all | grep -F UseBASE64Intrinsics
```

- flag is live: `bool UseBASE64Intrinsics = false {product} {command line}`

## the patch

the fix is four added lines in one file, `src/hotspot/cpu/x86/stubGenerator_x86_64.cpp`, with nothing removed and no test. the same change went to every branch: mainline, 27, 25, 21 and 17 each carry one commit with the same four lines. the hunk below is the whole mainline diff. on the other branches only the line numbers differ, and on 17 the code sits two spaces deeper and git labels the hunk with a neighbouring function's name.

it adds one check at the top of the routine's last step, the block that handles the final 1 to 63 characters. if fewer than four characters remain, the routine jumps to its existing slow path and leaves the tail to java. valid Base64 decodes to the same result as before. the public pull request of 9 september 2026 proposed the same idea: "The suggested fix is to early-return to Java if `length < 4`."

the dates need care. the mainline commit's author date is 13 october 2026, and it landed in the public repository on 16 november 2026. the 27 branch copy is dated 14 october, and the 17, 21 and 25 copies 12 november. calif writes that the bug "was patched only after we showed it could be exploited" and dates its own discovery to 24 october, after the author date. git dates can be set freely, so this page reports both and draws no conclusion. the fix adds no flag and no setting, so nothing at runtime proves a build has it: the version is the proof, and each fixed release tag (`jdk-17.0.21.1-ga`, `jdk-21.0.13.1-ga`, `jdk-25.0.5.1-ga`, `jdk-27.0.1.1-ga`) contains its branch's commit.

### src/hotspot/cpu/x86/stubGenerator_x86_64.cpp (CVE-2026-114938, +4 -0)

the whole fix. the two instructions compare the remaining length with 4 and jump to `L_bruteForce`, the routine's existing slow path, before the last masked step can run on a padded tail shorter than one block. the comment above them is the only description the commit gives; its title says only "Base64 optimization improvements".

```diff
@@ -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.
```

## how do I detect Java4Shell attempts?

there is no single request to look for. the bug is reached through any value the application Base64-decodes, in any field and over any protocol. no public suricata, sigma or nuclei detection was found as of 23 november 2026; the published rules are WAF rules, listed below. a crash is a lead, not proof, and by calif's account a successful exploit repairs the heap and does not crash.

- (request) a long Base64 or Base64url value whose length is not a multiple of 4 and that ends in `=`. the letters used do not matter, so match on length and padding, never on a repeated character. calif's simplest published case is 64 characters and one padding character; older JDK 17 builds need 128, because the AVX-512 path starts at a higher length on that line. valid Base64 always has a length divisible by 4, so real tokens should not match ([crowdsec](https://www.crowdsec.net/blog/java4shell-virtual-patching)). cloudflare still defaults its rules to log, because malformed input and some application token formats can look the same. the rule sets disagree on the minimum length: traefik and azure match 64 characters or more, crowdsec 32 or more.
- (request) the fields that carry it, as sources name them: `Authorization: Basic` and `Authorization: Bearer` (what greynoise observed), `Proxy-Authorization`, JWT segments, cookies, query, form and JSON fields, URL path segments, webauthn values, SAML artifacts and file uploads. protocols other than HTTP count too. cloudflare notes that the apache kafka broker accepts traffic over its own protocol.
- (request) the user agent `java4shell-scanner/1.0`, which greynoise saw from four IPs and files as a scanner check.

  ```
  User-Agent: java4shell-scanner/1.0
  ```

- (request) bursts of the same malformed value. [vulncheck](https://www.vulncheck.com/blog/java4shell) found that one request rarely crashes a server, and that "a simple burst of requests reliably brought the service down".
- (log) an `IllegalArgumentException` from `java.util.Base64` on a request that carried the shape above. the decoder rejects the input after the damage is done. any invalid Base64 raises the same exception, and the exact message text was not found in a source.
- (process) a JVM that crashes or restarts without cause, and new `hs_err_pid<pid>.log` files, which the JVM writes on a fatal crash. check point adds that crashes during garbage collection are a known sign of this corruption. the first public report, in june 2026, was a crash in the parallel garbage collector. CISA's list is "rogue runtimes, unexpected JVM crashes, and suspicious Java processes". a crash can be an attempt or the bug firing by accident: the june report was not an attack.

  ```
  hs_err_pid<pid>.log
  ```

### public detection rules

| rule set | rules | source |
| --- | --- | --- |
| cloudflare managed ruleset (pro, business, enterprise) | six rules, default action log. Java4Shell - Malformed Base64 Header 5de9b20a45ea45d3841919ab4d718bf4; Query Value 46bb4172813e471ea62d31c02337b51d; Body Value d4dc3f71f1bc44a0811ae570e5e5836c; Path Segment 0dceaf0684b54fd0b085fcfb6fd6f152; Base64url JWT Component 0ddd0eb664a040779f2f19065a25d991; Base64 WebAuthn Value 4fce1ea79a614c07a27348d167d74ebb | [cloudflare](https://blog.cloudflare.com/java4shell-waf-protection/) |
| traefik hub WAF (coraza, modsecurity syntax) | 1004000 and 1004001 (setup), 1004002 (headers, cookies, arguments, body), 1004003 (Authorization), 1004004 (path segment), 1004005 (percent-encoded cookie); action deny, status 403 | [traefik](https://traefik.io/blog/java4shell-buy-time-with-a-waf-then-update-the-jdk) |
| crowdsec appsec | crowdsecurity/vpatch-CVE-2026-114938, in the crowdsecurity/appsec-virtual-patching collection; action block | [crowdsec](https://www.crowdsec.net/blog/java4shell-virtual-patching) |
| check point IPS / WAF | CPAI-2026-18325, OpenJDK Base64 Decoder Memory Corruption PoC (CVE-2026-114938); needs prevent mode | [check point](https://blog.checkpoint.com/security/java4shell-cve-2026-114938-check-your-java-services-now/) |
| azure WAF (front door, application gateway) | Java4ShellB64Header, Java4ShellB64BodyField, Java4ShellB64Query, Java4ShellB64Authorization; custom rules the customer adds, not managed rules. a reader comment of 19 November 2026 says the Application Gateway body rule is missing a selector; unresolved | [microsoft](https://techcommunity.microsoft.com/blog/azurenetworksecurityblog/addressing-java4shell-cve-2026-114938-upgrade-guidance-and-azure-waf-mitigations/4574305) |
| vulncheck | Snort, Suricata, Sigma and YARA rules, for customers only | [vulncheck](https://www.vulncheck.com/blog/java4shell) |

## what can I do if I can't upgrade the JDK yet?

the upgrade is the fix. until it lands, one JVM flag removes the vulnerable code path, and red hat calls it "the preferred option". set it where the service reads its JVM options (`JAVA_TOOL_OPTIONS`, `JAVA_OPTS` for jenkins, `JAVA_OPTS_APPEND` for the keycloak server, a `config/jvm.options.d/` file or `ES_JAVA_OPTS` for elasticsearch), then restart. check point warns against using `-XX:DisableIntrinsic=_base64_decodeBlock` on its own, because it can stop java from starting.

| stopgap | closes | leaves open | source |
| --- | --- | --- | --- |
| start the JVM with `-XX:-UseBASE64Intrinsics` | the vulnerable code path. per red hat it "removes the vulnerable code path while leaving other AVX-512 optimizations in place" | nothing known for this CVE while the flag stays. a JVM that was not restarted, or a later `-XX:+UseBASE64Intrinsics`, puts the path back | [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) |
| start the JVM with `-XX:UseAVX=2` | all AVX-512 use in the JVM, and with it the vulnerable path | the same gaps as the first flag. apply it only on x86-64: an ARM64 JVM does not recognise it and will not start | [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) |
| turn on your WAF's Java4Shell rule | the published value shape, in the fields the rule inspects, for traffic that crosses the WAF | traffic that goes around it, protocols other than HTTP, nested or re-encoded values, uploads, websocket messages and outbound connections. cloudflare calls its rules "not a replacement for the patch" | [cloudflare](https://blog.cloudflare.com/java4shell-waf-protection/) |
| limit and validate Base64 input in the application | how far untrusted Base64 reaches. CISA lists "restricting and validating Base64 input at the application boundary, enforcing input-size limits, and limiting unauthenticated access" | any decode path the checks do not cover. it depends on the application | [CISA](https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching) |

## Java4Shell questions

### is java 17.0.21 patched against Java4Shell?

no. 17.0.21, 17.0.21.0.2 and 17.0.21.0.3 are vulnerable, and 17.0.21.1 is the first fixed release of java 17. [oracle](https://www.oracle.com/security-alerts/cspunov2026.html) lists 17.0.21.0.3 as affected, and the upstream tag `jdk-17.0.21.1-ga` is the first to contain the fix commit. read the fourth field of the version, not only the first three.

### which java versions are affected by Java4Shell (CVE-2026-114938)?

openJDK-based java 17 from 17.0.6 through 17.0.21.0.3, java 21 through 21.0.13.0.3, java 25 through 25.0.5.0.3 and java 27 through 27.0.1.0.3, on x86-64 CPUs with AVX-512 VBMI. the fixed releases are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. the ranges are [NVD's](https://nvd.nist.gov/vuln/detail/CVE-2026-114938), and the fixed releases match the upstream openJDK tags. install one and restart every JVM, because a running JVM keeps the old code.

### is java 8 or java 11 affected by Java4Shell?

no. [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) says "OpenJDK 8 and OpenJDK 11 do not contain it and are not affected", and adoptium and ubuntu say the same of their builds. the one exception is oracle java SE `8u511b33-perf`, which [oracle's advisory](https://www.oracle.com/security-alerts/cspunov2026.html) lists as affected.

### how do I check if my CPU has AVX-512 VBMI?

on linux, run `grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'`. per [calif](https://calif.io/java4shell), "The output must include all four flags" for the CPU to run the vulnerable path. the flag is `avx512vbmi`, with no underscore. in a container or VM, run it on the node.

### are ARM servers such as AWS graviton affected by Java4Shell?

no. calif says "ARM64 CPUs are not affected", and [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) says ARM64 systems need neither mitigation flag. [jenkins](https://www.jenkins.io/blog/2026/11/18/mitigating-java4shell/) adds s390x and ppc64le. x86-64 CPUs without AVX-512 VBMI are not affected either. an unpatched JVM that later moves to affected hardware is exposed again, so upgrade anyway.

### does -XX:-UseBASE64Intrinsics stop Java4Shell, and what does it cost?

yes. it removes the vulnerable code path, and [red hat](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018) calls it "the preferred option"; calif, adoptium, jenkins, keycloak and elastic give the same flag. it needs a restart of every JVM, and it slows Base64 encoding and decoding, because both lose hardware acceleration. no vendor has published a measured cost. confirm it took with `jcmd <pid> VM.flags -all | grep -F UseBASE64Intrinsics`. the `-XX:+UnlockDiagnosticVMOptions` that cloudflare's post adds is not needed: this is a plain product flag on java 17, 21 and 25.

### is Java4Shell being exploited?

not that anyone has confirmed, as of 23 november 2026. [greynoise](https://java4shell.events.greynoise.io/) counts 7 IPs, 261 Java4Shell-shaped requests and 0 successful intrusions since 17 november. the CVE is not in CISA's KEV catalog, and EPSS is 0.573. a private exploit exists: [vulncheck](https://www.vulncheck.com/blog/java4shell) says it has offered one to its customers since 17 november 2026.

### is Java4Shell the same as Log4Shell?

no. [crowdsec](https://www.crowdsec.net/blog/java4shell-virtual-patching) puts it this way: "Log4Shell (CVE-2021-44228) was an injection flaw in the Log4j library; Java4Shell is a memory corruption bug in the JDK itself, so updating libraries does not fix it." updating spring boot, tomcat or your own application does not fix it either. [quarkus](https://quarkus.io/blog/java4shell/) says of itself: "Quarkus is not affected. The JDK is."

### is keycloak, jenkins, jira or confluence affected by Java4Shell, and what do I install?

they are affected through the JDK they run on. [keycloak](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938) decodes Base64 before authentication; use the image tags `latest`, `26.8`, `26.8.2` or `26.8.2-3`, or a fixed JDK. for [jenkins](https://www.jenkins.io/blog/2026/11/18/mitigating-java4shell/), upgrade the controller's java to 17.0.21.1, 21.0.13.1 or 25.0.5.1 and restart. for jira and confluence data center, [atlassian](https://community.atlassian.com/forums/discussion/3317765/data-center-mitigations-for-cve-2026-114938) had not shipped releases with a fixed bundled JDK when its post was read on 23 november 2026, so apply its JVM flag mitigation; atlassian cloud is remediated. code execution before login on these products is calif's claim, and no vendor has confirmed it.

### can a WAF or cloudflare block Java4Shell at the network?

partly. a rule can match the published value shape (long Base64 with a length that is not a multiple of 4, ending in `=`) in the fields it inspects, for traffic that crosses it. it cannot see traffic that goes around it, protocols other than HTTP, or a value that is nested, re-encoded, inside an upload or in a websocket message. [cloudflare](https://blog.cloudflare.com/java4shell-waf-protection/) ships six managed rules that default to log and says the WAF is "not a replacement for the patch", because the bug can be reached "through paths a WAF does not see". [traefik](https://traefik.io/blog/java4shell-buy-time-with-a-waf-then-update-the-jdk) notes that its own test proved the gateway's behaviour, not the memory corruption. turn the rule on and upgrade the JDK.

## sources

- [CVE record: CVE-2026-114938](https://www.cve.org/CVERecord?id=CVE-2026-114938): oracle is the CNA: affected versions, CVSS 3.1 vector, CISA's SSVC entry, siemens product list
- [oracle critical security patch update advisory - november 2026](https://www.oracle.com/security-alerts/cspunov2026.html): risk matrix row and credit statement; read from the wayback capture of 19 november 2026
- [openJDK vulnerability advisory, 17 november 2026](https://openjdk.org/groups/vulnerability/advisories/2026-11-17): the project's own advisory: CVSS 8.1 for hotspot/compiler, affected builds 27.0.1.0.3, 25.0.5.0.3, 21.0.13.0.3 and 17.0.21.0.3, and its acknowledgements
- [openjdk/jdk: 8393212: Base64 optimization improvements](https://github.com/openjdk/jdk/commit/5177a70b385c16f26ede191fdac7aaba0bed0f8b): the fix, mainline commit 5177a70b385c
- [openjdk/jdk pull request 32781](https://github.com/openjdk/jdk/pull/32781): the unmerged fix of 9 september 2026 and the first public root-cause statement
- [adoptium-support issue 1480](https://github.com/adoptium/adoptium-support/issues/1480): the first public crash report, 9 june 2026
- [oss-security: disclosure-day post](https://www.openwall.com/lists/oss-security/2026/11/17/31): 17 november 2026 summary; a follow-up on 19 november links the fix commit
- [NVD: CVE-2026-114938](https://nvd.nist.gov/vuln/detail/CVE-2026-114938): version ranges (17.0.6 start); no score of its own
- [CISA alert: critical java vulnerability requires immediate patching](https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching): 17 november 2026; recommended actions
- [CISA known exploited vulnerabilities feed](https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json): catalog 2026.11.23 has no entry for this CVE
- [FIRST EPSS](https://api.first.org/data/v1/epss?cve=CVE-2026-114938): 0.573 on 23 november 2026
- [calif: Java4Shell: write once, RCE everywhere](https://calif.io/java4shell): the finder's write-up: product list, CPU check, mitigation flags, disclosure timeline
- [chainguard: Java4Shell](https://www.chainguard.dev/unchained/java4shell-how-a-malformed-base64-string-breaks-the-jvm-on-avx-512): independent rediscovery by fuzzing
- [vulncheck: Java4Shell](https://www.vulncheck.com/blog/java4shell): exploitability assessment; private exploit
- [greynoise: Java4Shell activity](https://java4shell.events.greynoise.io/): live counts of probing
- [red hat RHSB-2026-018](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018): conditions, mitigation ranking, CPU check, cloud instance families
- [red hat CVE data](https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2026-114938.json): 9.8 score, errata, per-product state
- [adoptium: temurin november 2026 release](https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell): temurin fixed versions
- [corretto 17 changelog](https://github.com/corretto/corretto-17/blob/develop/CHANGELOG.md): fixed version and date; the 21, 25 and 27 changelogs match
- [azul release notes](https://docs.azul.com/core/release-notes): zulu build numbers
- [microsoft build of openJDK: november 2026 update](https://devblogs.microsoft.com/java/java-openjdk-november-2026-critical-patch-update/): fixed versions
- [debian security tracker](https://security-tracker.debian.org/tracker/CVE-2026-114938): package versions
- [ubuntu: CVE-2026-114938](https://ubuntu.com/security/CVE-2026-114938): package versions
- [SUSE: CVE-2026-114938](https://www.suse.com/security/cve/CVE-2026-114938.html): package versions
- [amazon linux: CVE-2026-114938](https://explore.alas.aws.amazon.com/CVE-2026-114938.html): 8.8 score and advisories
- [keycloak: Java4Shell](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938): fixed image tags and verification commands
- [jenkins: mitigating Java4Shell](https://www.jenkins.io/blog/2026/11/18/mitigating-java4shell/): controller guidance and sample version output
- [atlassian: data center mitigations](https://community.atlassian.com/forums/discussion/3317765/data-center-mitigations-for-cve-2026-114938): data center mitigation; cloud remediated
- [elastic: ESA-2026-vpcg-q2wh](https://discuss.elastic.co/t/391703): elasticsearch and logstash scope and releases
- [quarkus: Java4Shell](https://quarkus.io/blog/java4shell/): UBI image status
- [cloudflare: Java4Shell WAF protection](https://blog.cloudflare.com/java4shell-waf-protection/): managed rule ids and what a WAF misses
- [traefik: buy time with a WAF, then update the JDK](https://traefik.io/blog/java4shell-buy-time-with-a-waf-then-update-the-jdk): published rules and their gaps
- [crowdsec: Java4Shell virtual patching](https://www.crowdsec.net/blog/java4shell-virtual-patching): appsec rule
- [microsoft: azure WAF mitigations](https://techcommunity.microsoft.com/blog/azurenetworksecurityblog/addressing-java4shell-cve-2026-114938-upgrade-guidance-and-azure-waf-mitigations/4574305): custom rules
- [check point: check your java services now](https://blog.checkpoint.com/security/java4shell-cve-2026-114938-check-your-java-services-now/): IPS id, crash indicators

## changelog and credits

- 2026-11-24: page published. facts checked against the CVE record, oracle's november 2026 critical security patch update advisory (wayback capture of 19 november 2026), the five fix commits and the release tags, NVD, FIRST EPSS, greynoise and CISA KEV catalog 2026.11.23 and the openJDK project's advisory.

oracle's advisory credits `Albert Yang` and `Quang Luong of Calif.io` for CVE-2026-114938. the fix was written by `Tobias Hartmann` with `Albert Mingkun Yang` as co-author, and backported to the 17, 21 and 25 branches by `Anton Voznia`. calif credits the original bug report to `sundarms` and `albertnetymk`. chainguard says it found the bug independently and reported it to oracle; oracle's statement does not credit it. the openJDK advisory acknowledges `Albert Yang` and `Quang Luong` among its reporters.

this page is maintained by yeet, which makes the yeet programmable firewall. we are not affiliated with oracle, the openJDK project or the researchers. [tell us](https://yeet.cx/contact) if something here is wrong.
