Blog 7 Min Read

Java4Shell: A Pre-Auth Flaw in Java's Base64 Decoder Puts the APIs Behind It at Risk

Java4Shell, also called Java2Shell, is a reported pre-authentication heap overflow in the Base64 decoder built into Java 17 and later. It hits only when three conditions line up, and the third is easy to meet: untrusted data reaching the decoder, as it does in most API login and token flows.
Blog cover for Java4Shell: A Pre-Auth Flaw in Java's Base64 Decoder Puts the APIs Behind It at Risk.

The flaw lives in the Java runtime, not a library, and the requests that reach it arrive before any login. Here is how to tell if you are exposed and what to do now.

TL;DR

Java4Shell (also called Java2Shell, CVE-2026-114938) is a reported pre-authentication heap overflow in the Base64 decoder built into the Java runtime itself. Early reports rate it 9.2 (Critical) under version 4.0 of the Common Vulnerability Scoring System (CVSS). It is not a library bug, so it will not show up in a dependency manifest: it lives in the Java Virtual Machine (JVM) your code runs on.

A system is at risk only when three things line up:

  • Runtime: Java 17.0.6 or later (Java 21, 25 and 27 reportedly carry the same code).

  • Hardware: an x86-64 processor with AVX-512 VBMI instructions, such as Intel Xeon Ice Lake or newer, or AMD EPYC Zen 4 or newer.

  • Input: attacker-controlled data reaching java.util.Base64 decoding, for example an HTTP Basic authentication header or a JSON Web Token (JWT).

Arm servers are not affected, and Android's runtime does not appear to use the vulnerable code. Patch when your Java vendor ships a confirmed fix. Until then, the JVM flag -XX:-UseBASE64Intrinsics turns off the vulnerable code path.

This post reflects what was public on November 17, 2026, ahead of the full technical disclosure. We will update it as Oracle and the OpenJDK distributions confirm details.

What Is Java4Shell?

The research firm Calif discovered and reported the flaw, and said on November 17 that details had leaked before a fix. The CVE record is still reserved. Public analyses of the OpenJDK source point to an integer underflow in HotSpot's hand-written x86 routine for decoding Base64 with AVX-512 instructions:

  • Once the just-in-time (JIT) compiler compiles the Base64 decoder, HotSpot swaps the Java decode loop for an AVX-512 assembly routine. On a busy server this happens quickly.

  • The routine decodes 64-byte blocks, then handles the last few bytes in one masked step.

  • A specific short, padded tail makes the computed output length go negative.

  • The store mask then masks nothing off, and the routine writes past the end of the output buffer on the Java heap.

  • The decoder throws an ordinary error, so the application sees nothing unusual.

Only the basic and URL-safe decoders take this path; the MIME decoder does not.

Remote code execution or crash? Reports call this remote code execution (RCE), but that has not been demonstrated. The overflow appears to write bytes the attacker does not choose, so the most likely result today is a JVM crash. That is still a pre-authentication denial of service against any exposed service. No public proof of concept or exploitation in the wild has been reported.

DateEvent
November 17, 2026Calif says the flaw leaked; Oracle ships its November Java update; full technical disclosure scheduled
November 12, 2026Oracle pre-announces fixes for 11 Java SE flaws, all exploitable over a network without credentials
January 2023OpenJDK 17.0.6 reportedly ships with the backported AVX-512 Base64 decoder
IncidentCVSS 9.2 CriticalLeaked Before Patch

CVE-2026-114938: Java4Shell, Pre-Authentication Heap Overflow in the Java Base64 Decoder

Reported by Calif and leaked before disclosure on November 17, 2026. Public analyses place the flaw in HotSpot's AVX-512 Base64 decoder on x86 servers, reachable through untrusted Base64 input before authentication, in Java 17.0.6 and later. Early reports rate it 9.2 under CVSS 4.0; a JVM crash is the likeliest outcome demonstrated so far. Oracle shipped Java updates the same day but has not tied them to this CVE.

Sources: CVE-2026-114938; Oracle November 2026 security update.

Am I Affected?

You are exposed only if all three conditions hold on the same host. Running Java 17 alone does not put you at risk.

ConditionAt riskNot at riskHow to check
Java runtime17.0.6 and later; 21, 25 and 27 reportedly carry the same codeJava 8 and 11, which lack the vulnerable decoder routinejava -version on the host, or jcmd <PID> VM.version for a running process
Processorx86-64 with AVX-512 VBMI and BW: Intel Xeon Ice Lake, Sapphire, Emerald and Granite Rapids; AMD Zen 4 and laterOlder Xeons (Skylake, Cascade Lake), AMD EPYC Rome and Milan, all Arm (Graviton, Ampere, Apple Silicon)grep -c avx512vbmi /proc/cpuinfo returns more than 0
Input pathUntrusted data reaches the java.util.Base64 basic or URL decodersCode that only uses the MIME decoder, or another library's decoderReview where request data is Base64-decoded

Java 8 and 11 are not exposed to Java4Shell, but Oracle's November update covers them for its other fixes, so patch those runtimes too.

Work through it host by host:

  • List every Java runtime: hosts, container base images and Java runtimes bundled inside vendor products.
  • Record vendor, version and exact build for each.
  • Flag the hosts and cloud instance types whose processors report AVX-512 VBMI.
  • Mark every service that runs Java 17.0.6 or later on those hosts. That is your exposed set.
  • Within that set, find every API that decodes request data from Base64.

Two details matter for inventory. First, the risk follows the runtime, not the build: the Java version that compiled your code is irrelevant, so this is a container image and host question more than a source code one. Second, cloud instance types change hardware. The same image can be safe on one instance family and exposed on another.

Why It Lands on Your APIs

The input condition is easier to meet than it sounds. Common Java frameworks decode HTTP Basic authentication headers with java.util.Base64 before checking the password, and common JWT libraries decode token headers and payloads the same way, often before verifying the signature. Both run before any login, which is what makes this pre-authentication.

That puts your APIs on the front line: login and token endpoints, API gateways, webhook receivers and any service that accepts Base64 in a request body. It also means the hardest part of the response is not the patch. It is the list. You need every API you run, including internal, partner and mobile backend APIs, and the runtime behind each one. The APIs nobody inventoried are the ones that get missed.

What About Android and Mobile Apps?

Mobile apps on user devices are very unlikely to be affected, but the APIs behind them may be. Nearly all Android phones run on Arm, which this flaw does not touch. For the small number of x86 Android devices and emulators, our team's early analysis points the same way: Android Runtime (ART) has no Base64 decoder in its intrinsic list, so stock Android shares OpenJDK's decoder source but not HotSpot's AVX-512 routine. We will confirm this against the full disclosure.

The real mobile exposure is server-side. Many mobile backends are Java services that parse Basic authentication headers, JWTs and Base64 payloads from the app. If those run Java 17 or later on recent Intel or AMD cloud instances, they meet all three conditions above.

What to Do Now

Start with inventory and the interim flag today; patch as soon as your Java vendor ships a confirmed fix.

  • Inventory every Java runtime and the APIs it serves (checklist above).

  • Prioritize pre-authentication decoding: internet-facing APIs, login and token endpoints, API gateways and webhook receivers first. Do not skip internal services that decode data from other systems.

  • Apply the interim mitigation. Disabling the intrinsic falls back to the plain Java decoder, which is slower but not vulnerable. No vendor has confirmed either flag for this CVE yet, so test before rolling out widely. In containers, set the flag through the JAVA_TOOL_OPTIONS environment variable to avoid rebuilding images.

  • Patch when fixes land. Oracle's November 17 update moves Java 8 to 8u513, Java 11 to 11.0.33.1, Java 17 to 17.0.21.1, Java 21 to 21.0.13.1, Java 25 to 25.0.5.1 and Java 27 to 27.0.1.1, but Oracle has not tied any of its 11 fixes to this CVE. Other Java distributions and the Linux distributions will ship on their own schedules, and a back-ported fix may not change the version string, so check each vendor's advisory and build number.

  • Update every container base image. Change each Java FROM line to the patched release for its branch, keeping the variant (such as -jre). Update every stage of multi-stage builds, plus any build argument or image digest that selects the image.

  • Replace the deprecated openjdk image. Docker deprecated it in July 2022 and points to maintained distributions instead.

  • Rebuild, restart and verify. A patched runtime on disk does nothing for a JVM that is still running. Rebuild with docker build --pull --no-cache, replace every running container, and confirm the live build with java -version inside the container or jcmd <PID> VM.version.

  • Watch for probing. Since the likeliest outcome is a crash, a spike in JVM crash logs (hs_err_pid*.log) on services that handle authentication headers or tokens is worth investigating.

The interim flags:

bash
# Narrow fix: turn off only the Base64 intrinsic
-XX:-UseBASE64Intrinsics

# Broader fix: cap at AVX2 (also slows crypto and other vectorized code)
-XX:UseAVX=2

# Verify what the JVM actually picked up
java -XX:+PrintFlagsFinal -version | grep -E 'UseAVX|UseBASE64Intrinsics'

How Data Theorem Is Responding

Our security research team began tracking Java4Shell the morning the first reports appeared, and we are treating it as a P1 for affected runtimes.

  • Finding exposed customers now. We are reviewing customer inventories for Java 17 and later services and will contact affected customers directly.

  • Mapping the APIs in the line of fire. API Secure discovers every API across your environment, including shadow APIs nobody inventoried, so you can work the list above starting from the APIs that face the internet.

  • Detecting vulnerable runtimes in your builds. Code SAST Secure now flags any Dockerfile that selects a Java base image with an affected runtime. The check runs by default as a P1 container security finding and names the patched image to move to. Because the risk follows the runtime, we are extending checks to the API services those images back.

  • In-product alerts. Customers with potentially affected assets will see an alert in the Data Theorem portal with the steps above.

  • Mobile analysis. We are validating our early finding that Android's runtime does not use the vulnerable decoder, and mapping the mobile backends that do.

Java4Shell will not be the last runtime flaw that leaks before its patch. AI Exploits confirms whether a finding can actually be exploited, so teams fix real risk first. AI Auto-Remediation fixes what you find instead of waiting for a working exploit to prove the risk. And AI Active Protection blocks attacks against live apps and APIs while fixes roll out. It is cover while you fix, not a reason to skip the fix.

We will update this post when the checks ship and when the full technical disclosure confirms or changes any of the details above.

Schedule a demo to see every API you run, including the ones nobody inventoried, and how Data Theorem protects them.

Schedule a demo

Sources

Share
Written By

Data Theorem Security Research Team

Get Started

See What We Find in Your Apps

Request a demo and see Data Theorem results on your own apps and APIs.

Request a Demo