Security advisory · CVE-2026-114938 · OpenJDK HotSpot
Java4Shell
Published
HotSpot's x86-64 AVX-512 Base64 decode intrinsic miscomputes the output length when the input ends in a short padded tail, = or ==. The length underflows, the tail mask becomes all-ones, and the stub writes 62 to 63 bytes past the output array. It was disclosed on 2026-11-17 as "Java4Shell".
The attacker needs no account: any input that reaches java.util.Base64's basic or URL decoder, such as an Authorization: Basic header, can crash the JVM. The discoverer reports remote code execution. Equixly argues an attacker controls few of the overflowing bytes, because the decoder determines most of them, so a crash is the more certain outcome. Treat code execution as the upper bound.
- Impact
- Unauthenticated JVM crash, possibly code execution
- Affected
- OpenJDK 17.0.6 and later, 18 – 27, on AVX-512 VBMI CPUs
- Fixed in
- Oracle
17.0.21.1·21.0.13.1·25.0.5.1·27.0.1.1; Amazon Corretto17.0.21.1.2·21.0.13.1.2·25.0.5.1.2·27.0.1.1.4 - Other vendors
- No fixed build shipped yet
- Disclosed
[01]
The CPU decides
Reachable
AVX-512 VBMI on x86-64
The intrinsic is only compiled on x86-64 CPUs with AVX-512 VBMI, and only when the JVM runs with its defaults: UseAVX=3 and UseBASE64Intrinsics=true. The JIT must also have compiled the decoder, which any busy service will have done.
Present, not exploitable
Every other CPU
The same vulnerable JDK on ARM64 or an older x86 CPU never reaches the bug. It still needs patching, since an image moves between hosts, but it is not an emergency.
Which CPUs reach it
| CPU | Reaches the bug |
|---|---|
| Intel Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids Xeon | yes (AVX-512 VBMI) |
| AMD EPYC / Ryzen Zen 4 and newer | yes |
| Intel Skylake-SP, Cascade Lake, Cooper Lake Xeon | no (no VBMI) |
| AMD EPYC Naples, Rome, Milan | no |
| Intel desktop Alder Lake and newer | no (AVX-512 fused off) |
| ARM64: Graviton, Ampere, Cobalt, Axion, Apple silicon | no (no AVX-512) |
[A]Timeline
11-17
Calif.io discloses Java4Shell. Oracle's Critical Patch Update ships fixed builds of 17, 21, 25 and 27.
11-17
OpenJDK's advisory lists the CVE as fixed in the 17, 21, 25 and 27 releases, scored CVSS v3.1 8.1. Affected:
17.0.21.0.3,21.0.13.0.3,25.0.5.0.3,27.0.1.0.3and earlier.11-17
Amazon Corretto ships
17.0.21.1.2,21.0.13.1.2,25.0.5.1.2and27.0.1.1.4, the first fixed builds outside Oracle.
[B]Not affected
- Java 8 and 11, and OpenJDK 17.0.0 to 17.0.5, which predate the intrinsic.
- IBM Semeru and Eclipse OpenJ9.
- The MIME decoder, and third-party Base64 in Jackson, Apache Commons Codec, Nimbus JOSE+JWT and JJWT.
- GraalVM native-image executables.
[C]Two scores
The preliminary CVSS v4.0 score at disclosure was 9.2. OpenJDK scores it 8.1 on CVSS v3.1, with high attack complexity. Fixed source is upstream, but each vendor's build is what you install, and only Oracle and Corretto have shipped one.
Fixed versions
| Runtime | Affected | Fixed in |
|---|---|---|
| Oracle Java SE | 17.0.21, 21.0.13, 25.0.5, 27.0.1 and below | 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 |
| Amazon Corretto | below the CPU fix | 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4 |
| Temurin, Zulu, Microsoft, Liberica, Red Hat, SapMachine, GraalVM | 17.0.6 and later, 18 – 27 | no fixed build shipped yet |
| Linux distro openjdk packages | 17.0.6 and later, 18 – 27 | no fixed package shipped yet |
| OpenJDK 17.0.0 – 17.0.5 | not affected (predates the intrinsic) | — |
| Java 8 and 11 | not affected (no Base64 decode intrinsic) | — |
| IBM Semeru / Eclipse OpenJ9 | not affected (different JIT) | — |
These are a snapshot from 2026-11-18 03:30 UTC, and most vendors had not shipped. Anything the scanner cannot place against a known fix is reported as no-fix-released or check-vendor, never patched.
Stopgaps
Until every JVM runs a fixed build, close the vulnerable path. None of these is vendor-confirmed for this CVE:
- Narrowest:
-XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_decodeBlock - Broader:
-XX:-UseBASE64Intrinsics, which turns off the Base64 encode and decode intrinsics. - Last resort, x86-64 only:
-XX:UseAVX=2. OpenJDK on ARM rejects it and will not start. - A WAF rule rejecting a padded
Authorization: Basicvalue whose length is not a multiple of 4 blocks the simplest unauthenticated path, but not every decoder.
Set a flag per service or through JAVA_TOOL_OPTIONS, restart, and check the running process with jcmd <pid> VM.flags | grep UseBASE64Intrinsics. java -XX:+PrintFlagsFinal -version starts a fresh JVM and only shows the defaults.
[02]
Check and fix with Swamp
Step 1:Am I affected?
A host is exposed when all three of these are true. Risk is highest when the JVM also listens on a public address and decodes Base64 it was sent.
No indicators of compromise have been published. Repeated JVM crashes with new
hs_err_pid*.logfiles, aSIGSEGVin a Base64 orStubRoutinesframe, or bursts ofIllegalArgumentExceptionfromjava.util.Base64are hints to investigate, not proof.- It runs OpenJDK
17.0.6or later, or any release from 18 to 27. - That runtime is not a fixed Oracle or Amazon Corretto build. No other vendor has shipped one yet.
- Its CPU is x86-64 with AVX-512 VBMI: Intel Ice Lake Xeon or newer, or AMD Zen 4 or newer. Check for
avx512vbmiin/proc/cpuinfo.
- It runs OpenJDK
Step 2:Install Swamp and the scanner
The @swamp/cve/java4shell extension finds every Java runtime on a host, in distro paths, Homebrew, SDKMAN, jabba, asdf, mise and the macOS locations, and every running JVM. It reads each one's vendor and version, the CPU's AVX-512 VBMI flag, and whether a running JVM already has the intrinsic off.
scanneeds no root and never uses sudo. It never runs ajavabinary that anyone but root or the scanning user could have written.Install Swamp:
curl -fsSL https://swamp-club.com/install.sh | shInitialize a new repo (run this in a new empty directory):
swamp repo initPull the scanner:
swamp extension pull @swamp/cve/java4shellCreate the scanner, with the SSH login it uses for remote hosts:
swamp behavior create @swamp/cve/java4shell j4s-fleet \ --global-arg sshUser=ops \ --global-arg sshKey=~/.ssh/fleetAm I affected (this machine):
swamp behavior run j4s-fleet scanPlan the fix (writes a script, changes nothing):
swamp behavior run j4s-fleet mitigateScan a running container, or an image:
swamp behavior create @swamp/cve/java4shell j4s-api \ --global-arg dockerContainer=api swamp behavior create @swamp/cve/java4shell j4s-img \ --global-arg dockerImage=eclipse-temurin:21-jre swamp behavior run j4s-img scanDistroless images have no
sh, so the scanner runs their ownjava -versiondirectly and lists what it could not check.›Image scan results
A real scan of
gcr.io/distroless/java21-debian12as pulled on 2026-11-18, on an ARM64 Docker host: it ships Temurin21.0.10, and the CPU cannot reach the bug, so the risk is low.# Java4Shell Scan (CVE-2026-114938) 1 target(s): 0 reachable (affected runtime on an AVX-512 VBMI CPU), 1 with an affected runtime the CPU cannot reach, 0 clean ┌───────────────────────────────────┬──────────────┬──────────┬──────────┬─────────────────┬──────┬───────────────┐ │ Target │ CPU │ Runtimes │ Affected │ Worst │ Risk │ Action │ ├───────────────────────────────────┼──────────────┼──────────┼──────────┼─────────────────┼──────┼───────────────┤ │ gcr.io/distroless/java21-debian12 │ not-affected │ 1 │ 1 │ no-fix-released │ LOW │ rebuild-image │ └───────────────────────────────────┴──────────────┴──────────┴──────────┴─────────────────┴──────┴───────────────┘ ## Affected runtimes ┌───────────────────────────────────┬──────┬───────────────┬─────────────────────────┬─────────────────┬──────────┬───────────────┐ │ Target │ Kind │ Path │ Vendor/Version │ Verdict │ Fixed in │ Action │ ├───────────────────────────────────┼──────┼───────────────┼─────────────────────────┼─────────────────┼──────────┼───────────────┤ │ gcr.io/distroless/java21-debian12 │ jdk │ /usr/bin/java │ Eclipse Temurin 21.0.10 │ no-fix-released │ — │ rebuild-image │ └───────────────────────────────────┴──────┴───────────────┴─────────────────────────┴─────────────────┴──────────┴───────────────┘ ## Not checked * gcr.io/distroless/java21-debian12: CPU AVX-512 flags were not read, but the architecture (aarch64) settled the CPU gate as not-affected. * gcr.io/distroless/java21-debian12: Running JVMs (no /proc): only installed runtimes were inventoried.Step 3:Scan your fleet
Pass a comma-separated list of hosts and
scanFleetscans Linux and macOS hosts in parallel over SSH. A host that needs a different login takes it asuser@host; plain entries usesshUser, and every host usessshKey.Each host is rated on its runtime, its CPU and its exposure:
criticalonly when an affected runtime runs on an AVX-512 VBMI CPU and listens publicly. An x86-64 host whose flags could not be read isunknown, never assumed safe.swamp behavior run j4s-fleet scanFleet \ --input hosts=ubuntu@192.0.2.10,ec2-user@192.0.2.11,192.0.2.12›Scan results
A real scan of
eclipse-temurin:21-jreas pulled on 2026-11-18, on an ARM64 Docker host. Temurin21.0.13is affected with no fixed build yet; on an AVX-512 VBMI host the same image would rateHIGH.# Java4Shell Scan (CVE-2026-114938) 1 target(s): 0 reachable (affected runtime on an AVX-512 VBMI CPU), 1 with an affected runtime the CPU cannot reach, 0 clean ┌────────────────────────┬──────────────┬──────────┬──────────┬─────────────────┬──────┬───────────────┐ │ Target │ CPU │ Runtimes │ Affected │ Worst │ Risk │ Action │ ├────────────────────────┼──────────────┼──────────┼──────────┼─────────────────┼──────┼───────────────┤ │ eclipse-temurin:21-jre │ not-affected │ 1 │ 1 │ no-fix-released │ LOW │ rebuild-image │ └────────────────────────┴──────────────┴──────────┴──────────┴─────────────────┴──────┴───────────────┘ ## Affected runtimes ┌────────────────────────┬──────┬────────────────────────────┬─────────────────────────┬─────────────────┬──────────┬───────────────┐ │ Target │ Kind │ Path │ Vendor/Version │ Verdict │ Fixed in │ Action │ ├────────────────────────┼──────┼────────────────────────────┼─────────────────────────┼─────────────────┼──────────┼───────────────┤ │ eclipse-temurin:21-jre │ jdk │ /opt/java/openjdk/bin/java │ Eclipse Temurin 21.0.13 │ no-fix-released │ — │ rebuild-image │ └────────────────────────┴──────┴────────────────────────────┴─────────────────────────┴─────────────────┴──────────┴───────────────┘ ## Recommendations * No fixed build has shipped for the affected non-Oracle runtimes yet. Apply the JVM stopgap flag now and upgrade as soon as the vendor publishes a build. * This is a container: rebuild the image on a fixed (or stopgap-flagged) base and redeploy; a running container keeps the old runtime. * This host's CPU cannot reach the vulnerable intrinsic, so exploitation is not possible here, but still patch when the vendor ships a build (another host, or a CPU change, may be affected).And
amazoncorretto:21pulled the same day, which already ships the fixed build:# Java4Shell Scan (CVE-2026-114938) 1 target(s): 0 reachable (affected runtime on an AVX-512 VBMI CPU), 0 with an affected runtime the CPU cannot reach, 1 clean ┌───────────────────┬──────────────┬──────────┬──────────┬─────────┬──────┬────────┐ │ Target │ CPU │ Runtimes │ Affected │ Worst │ Risk │ Action │ ├───────────────────┼──────────────┼──────────┼──────────┼─────────┼──────┼────────┤ │ amazoncorretto:21 │ not-affected │ 1 │ 0 │ patched │ NONE │ none │ └───────────────────┴──────────────┴──────────┴──────────┴─────────┴──────┴────────┘
Step 4:Mitigate across your fleet
No package manager can install a fixed build for most distributions yet, and a global JVM flag is unsafe, so
mitigatenever changes a host. It scans, then saves a remediation script per host for you to review and run as root.Containers are reported for an image rebuild. Windows hosts are not scanned in this version; check them by hand.
swamp behavior run j4s-fleet mitigate \ --input hosts=192.0.2.10,192.0.2.12The script names the Oracle fixed build where one exists, lists the runtimes still waiting on a vendor, and sets the stopgap on each affected systemd service with a drop-in at
/etc/systemd/system/<unit>.d/java4shell.conf:Environment="JAVA_TOOL_OPTIONS=-XX:+IgnoreUnrecognizedVMOptions -XX:-UseBASE64Intrinsics"systemd does not read
/etc/profile.d, so a login-shell profile would never reach a service.-XX:+IgnoreUnrecognizedVMOptionskeeps a Java 8 JVM, which has no such flag, from refusing to start. Only affected units are touched; passrestartServices=falseto leave the restarts out of the script.›Mitigation results
mitigateon the sameeclipse-temurin:21-jreimage: it reports the image to rebuild and saves the plan.# Java4Shell (CVE-2026-114938) Remediation Plan mitigate does not change the host. Review each saved script and run it as root. ┌────────────────────────┬───────────────┬──────┬───────────────┐ │ Target │ Outcome │ Risk │ Action │ ├────────────────────────┼───────────────┼──────┼───────────────┤ │ eclipse-temurin:21-jre │ rebuild-image │ LOW │ rebuild-image │ └────────────────────────┴───────────────┴──────┴───────────────┘ ## eclipse-temurin:21-jre * This CPU cannot reach the vulnerable intrinsic, so exploitation is not possible here; the stopgap is optional. Patch on the normal cycle once the vendor ships a build. * This is a container: rebuild the image on a fixed or stopgap-flagged base and redeploy. mitigate does not change containers. Saved script (sh): #!/bin/sh # Java4Shell (CVE-2026-114938) remediation — review before running (needs root). # Host: 0ee2a7bddd71 CPU: not-affected (aarch64) set -e # 1. No fixed build has shipped for these runtimes yet; watch the vendor: # Eclipse Temurin 21.0.13 at /opt/java/openjdk/bin/java # 2. Stopgap until a fixed build is installed. Set the flag per affected # service with a systemd drop-in (systemd does not read login-shell profiles): # -XX:+IgnoreUnrecognizedVMOptions -XX:-UseBASE64Intrinsics # (narrower: -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_decodeBlock # ) # No systemd unit was identified for the affected JVMs. Add the flag to # each service's own launch configuration (its JAVA_TOOL_OPTIONS, JVM args, # or container env). # 3. Restart each affected service so it picks up the flag (no systemd unit # was identified to restart automatically). # 4. Verify a service JVM with: jcmd <pid> VM.flags | grep UseBASE64Intrinsics # (java -XX:+PrintFlagsFinal -version | grep -E ' (UseAVX|UseBASE64Intrinsics) ' starts a fresh JVM and only shows the defaults.) After applying, verify with: swamp behavior run j4s-img scan
[03]
References
Find every JVM that can reach it
Pull the scanner and run it against every host, container and image you own.
swamp extension pull @swamp/cve/java4shell