Blog / Security Advisories

Java4Shell (CVE-2026-114938): OpenJDK Base64 RCE, Fixed JDK Builds, and How to Check Your Services

On November 17, 2026, Oracle and the OpenJDK Vulnerability Group shipped fixes for a memory corruption bug in Java’s built-in Base64 decoder. On modern Intel and AMD servers, a single malformed Base64 string, such as a bogus Authorization: Basic header, can corrupt the heap of a Java 17, 21, 25, or 27 process. Researchers showed pre-login remote code execution in Keycloak, Jira, Confluence, Jenkins, Artifactory, and PingFederate. Here are the fixed builds, how to tell if you are exposed, and the one JVM flag that buys you time.

· 10 min read

CVE-2026-114938, nicknamed Java4Shell, is a heap overflow in the hand-written x86-64 assembly that HotSpot’s C2 JIT compiler uses to speed up java.util.Base64 decoding. It only fires on CPUs with AVX-512 VBMI, which today means most current cloud x86 instances: Intel Xeon Ice Lake and newer, and AMD Zen 4 and newer. Oracle rates it 8.1 (CVSS 3.1); Calif, the firm that found it, rates it 9.2 (CVSS 4.0). Unlike Log4Shell, there is no library to bump: the bug is in the JDK itself, so every framework on top of it inherits the exposure until the runtime is patched.

This article was created with AI assistance. Facts were checked against the Calif write-up, Oracle’s fixed versions as reported by Tenable, and the Keycloak and HeroDevs advisories on November 18, 2026. The situation is moving quickly; confirm details with your JDK vendor before acting.

TL;DR: what to do today

  1. Upgrade the JDK to your vendor’s November 17, 2026 build, then restart every JVM and rebuild container images, since images bundle their own runtime.
  2. If you cannot patch yet, add -XX:-UseBASE64Intrinsics to every affected JVM and verify it with jcmd (see mitigations).
  3. Prioritize internet-facing Java services on x86-64 hosts with AVX-512 VBMI, starting with identity providers, CI servers, and anything that decodes Basic auth or JWTs before login.
Java lineOracle affected buildOracle fixed build
Java 2727.0.1.0.327.0.1.1
Java 25 (LTS)25.0.5.0.325.0.5.1
Java 21 (LTS)21.0.13.0.321.0.13.1
Java 17 (LTS)17.0.21.0.3 (17.0.6 and later affected)17.0.21.1
Java 8 Enterprise Performance Pack8u511b33-perf8u513-perf
Java 26 (non-LTS)AffectedNo fix planned; move to 25 or 27
Standard Java 8 and 11Not listed as affected

Amazon Corretto, Eclipse Temurin, Azul Zulu, Microsoft Build of OpenJDK, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, and GraalVM are all built from the affected code and ship fixes under their own version labels. As of November 18, Corretto had published fixed builds and Red Hat was still preparing its own. Check your vendor’s advisory for the exact build that lists CVE-2026-114938.

Timeline

DateEvent
Early 2023The AVX-512 Base64 decoding fast path reaches the Java 17 line with 17.0.6, which is where the affected range starts
Before November 17, 2026Quang Luong of Calif and Albert Yang report the bug; Oracle credits both
November 17, 2026Details leak ahead of the coordinated release. Calif confirms the bug publicly, then Oracle’s November Critical Patch Update and the OpenJDK advisory go live at 1:00 p.m. PT, followed by Calif’s write-up and a trigger-only proof of concept
November 17, 2026Kevin Breen of Immersive says he has built a working application-specific exploit, which he has not released
November 18, 2026Keycloak publishes guidance for its affected container images. No exploitation reported; not in CISA’s KEV catalog

What went wrong: a padding edge case in a 64-byte store

To decode Base64 quickly, HotSpot replaces Base64.Decoder.decode() with an assembly routine once the method is hot enough for the C2 compiler. On AVX-512 VBMI CPUs, that routine handles the last partial block of input with a masked 64-byte vector store: a bit mask says which of the 64 output bytes should actually be written.

According to Calif, the routine miscalculates the mask when the input ends in = padding. The computed output length can underflow to -1 or -2, which turns the mask into all ones, so the CPU writes a full 64 bytes into a buffer that is much smaller. In Calif’s example, 62 bytes land past the end of the output array.

Two details make this worse than a typical crash bug:

  • Java rejects the input afterwards. The decoder still throws IllegalArgumentException for the malformed string, so application code sees a normal validation error. The heap is already corrupted by then.
  • Attackers control the timing. The fast path only runs once the decoder is JIT-compiled, and an attacker can warm it up by first sending plenty of valid Base64.

The overflow writes fixed bytes rather than attacker-chosen data, and exploitation depends on heap layout, garbage collection, and network timing, so every target needs its own exploit and failed attempts can crash the process. Calif describes two outcomes: reading process memory such as keys and session tokens (which it calls “JavaBleed”), and full remote code execution.

Who is affected

A service is exploitable only when all of the following are true:

  • It runs an unpatched OpenJDK-based runtime in the affected range (17.0.6+, 21, 25, 26, or 27).
  • The host is x86-64 and exposes avx512f, avx512bw, avx512vbmi, and bmi2 to the JVM. ARM64, including AWS Graviton and Ampere, is not affected.
  • The C2 JIT is running with UseBASE64Intrinsics enabled, which is the default.
  • Attacker-controlled data reaches java.util.Base64 decoding.

Calif demonstrated exploitation in these products in their default configurations, and stresses that the list is not exhaustive:

Before login (pre-auth)After login (post-auth)
Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederateApache Kafka broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker

Calif also exploited sample Apache Struts and Spring Boot applications, and notes that Java clients that open TLS connections to a malicious server may be reachable too.

Keycloak specifically: the x86-64 images 26.8.2-1 and 26.8.2-2 bundle an affected OpenJDK 21.0.13 build. As of November 18 the Keycloak team had not yet published fixed images and recommends the JVM flag workaround in the meantime. Do not use the Keycloak version alone to decide whether you are fixed; check the bundled runtime.

How attacker input reaches the decoder in a Java API

Base64 is everywhere in HTTP APIs, and much of it is decoded before anyone is authenticated. HeroDevs points out that no Spring, Tomcat, or Jetty release fixes this CVE, because the framework code is not the problem. The common entry points:

  • HTTP Basic authentication. The Authorization: Basic header is Base64-decoded before the credentials are checked. This applies to Spring Security’s HTTP Basic filter, Tomcat’s BasicAuthenticator (9.0.89+, 10.1.23+), and Jetty’s BasicAuthenticator. If any endpoint on the server accepts Basic auth, anonymous users can reach the bug.
  • JWTs and other bearer tokens. Libraries such as Auth0 java-jwt decode the header and payload with Base64.getUrlDecoder() before verifying the signature.
  • Base64 fields in request bodies. File uploads, images, signatures, encrypted blobs, and SAML messages in JSON, XML, or form data.
  • Cookies and state parameters. Session cookies, CSRF tokens, OAuth state, and pagination cursors are often Base64-encoded.
  • WebSocket messages after the upgrade, which bypass the request buffering many reverse proxies do.

Older stacks are the riskiest: Spring Boot 2.7, Jetty 9.4 to 11, and Struts 2.5 apps that were moved onto Java 17 or 21 to stay supported are affected by this JDK bug, and their frameworks no longer get open-source security fixes.

Check whether a service is exposed

# 1. Does the CPU have the vulnerable feature set? (four lines means yes)
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' \
  | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

# 2. Which Java runtime is in use? (compare with your vendor's fixed build)
java -version

# 3. Is the intrinsic enabled in a running JVM?
jcmd <pid> VM.flags -all | grep -E 'UseBASE64Intrinsics|UseAVX'

# 4. Inside a container image
docker run --rm --entrypoint java your-image:tag -version

Containers see the host’s CPU, so run step 1 on the node, not just in your laptop’s build environment. In Kubernetes, check every x86-64 node pool a workload can be scheduled on, since a pod that is safe on an older instance type becomes exploitable when the autoscaler moves it to a newer one.

To confirm a patch, Calif’s write-up includes a small local reproducer. Run it on production-equivalent hardware with the same JDK, never against a live service, and avoid unreviewed “PoC” repositories that have appeared on GitHub since the leak.

Mitigations if you cannot patch right now

  • Disable the vulnerable intrinsic. -XX:-UseBASE64Intrinsics removes the affected code path and nothing else; Base64 decoding falls back to the regular Java implementation.
    # Generic JVM (picked up by the java launcher, JDK 9+)
    export JDK_JAVA_OPTIONS="-XX:-UseBASE64Intrinsics"
    
    # Keycloak container
    JAVA_OPTS_APPEND="-XX:-UseBASE64Intrinsics"
    
    # Verify on the running process: expect "UseBASE64Intrinsics = false"
    jcmd <pid> VM.flags -all | grep UseBASE64Intrinsics
    Setting an environment variable is not proof. Some start scripts and service wrappers ignore it, so always check the running JVM.
  • Or cap the vector width. -XX:UseAVX=2 turns off AVX-512 entirely. It works on x86-64 but affects more than Base64, and the JVM will refuse to start on ARM with it, so be careful with shared configuration.
  • Do not rely on your reverse proxy. Request buffering, such as nginx’s default, does not block every exploitation profile and does nothing for WebSocket traffic.
  • Reduce pre-auth surface. Turn off HTTP Basic authentication on endpoints that do not need it, and put admin consoles and CI servers behind a VPN or identity-aware proxy.
  • Then patch anyway, and remove the flag once you are on a fixed build.

Look for signs of exploitation

Failed exploitation attempts are noisy because heap corruption tends to crash the JVM. Look for:

  • Unexplained JVM crashes, hs_err_pid*.log files, or container restarts on internet-facing Java services since November 17.
  • Bursts of requests with long or malformed Authorization: Basic headers, JWTs, or Base64 body fields, especially many valid requests followed by invalid ones ending in =.
  • Spikes in IllegalArgumentException from Base64 decoding in application logs.

If an exposed service crashed for no clear reason, treat it as a possible compromise. Because Java4Shell can also leak memory, rotate secrets the process held: signing keys, OAuth client secrets, API tokens, database credentials, and TLS private keys. For identity providers like Keycloak, that includes realm signing keys and active sessions.

The lesson for API teams: pre-auth parsing is attack surface

Java4Shell is a JDK bug, and you cannot code around it. But it is a sharp reminder of something that applies to every API: everything your service parses before it knows who the caller is can be attacked by anyone. Authorization headers, tokens, cookies, and upload fields are decoded by layers of framework and runtime code your team did not write and rarely tests with hostile input.

  • Know your pre-auth surface. List which endpoints accept Basic auth, which decode tokens, and which take encoded payloads without a session. Your OpenAPI securitySchemes are a good starting inventory.
  • Reject early and cheaply. Enforce maximum lengths on headers, tokens, and encoded fields at the edge, before they reach a decoder.
  • Watch for 5xx on malformed input. A malformed credential should produce a clean 400 or 401. Server errors, timeouts, or crashes on bad auth input mean a parser is doing something unexpected.
  • Retest after every runtime upgrade. Emergency JDK bumps and base-image rebuilds change behavior under your code. Make sure your auth checks still fail closed afterwards.

How DastPilot helps around a bug like Java4Shell

To be clear about what DAST can and cannot do here: DastPilot will not tell you whether a JVM is vulnerable to CVE-2026-114938. Exploitability depends on the CPU, JIT state, and heap layout, so use your JDK inventory, image scanner, and the commands above, and patch. Sending exploit payloads at production to “check” is a good way to crash it.

Where dynamic application security testing earns its place is everything around the patch. DastPilot scans your APIs from an OpenAPI spec or Postman collection, as every role you configure, and the checks most relevant this week are:

  • Pre-auth surface mapping: calls every documented endpoint with no credentials, so you get a concrete list of what anonymous users can reach. Together with the Basic and bearer security schemes in your spec, that tells you which Java services to patch first.
  • Broken token handling: sends malformed, truncated, tampered, and expired JWTs and Basic credentials, and flags endpoints that accept them or respond with server errors instead of a clean 401.
  • Improper input handling: fuzzes parameters and body fields with values outside your spec, including oversized and malformed encoded strings, and flags 5xx responses and unexpected successes.
  • Privilege escalation (BFLA) and object access (BOLA): replays admin operations as lower roles and swaps object IDs between users, so a stolen token or session does not become full access.
  • Regression tracking: every scan is compared with the last, so if an emergency JDK upgrade or base-image rebuild changes how your auth layer behaves, the finding shows up as new or reopened.

Patch the runtime to close Java4Shell. Then run DastPilot in your CI/CD pipeline against the rebuilt service, so the fix ships with proof that authentication still fails closed and no endpoint is quietly reachable without it.

Frequently asked questions

What is Java4Shell (CVE-2026-114938)?

Java4Shell, CVE-2026-114938, is a heap memory corruption bug in the hardware-accelerated java.util.Base64 decoder in OpenJDK HotSpot on x86-64 CPUs with AVX-512 VBMI. A crafted Base64 string ending in padding makes the decoder write past the end of its output buffer. Researchers at Calif demonstrated pre-authentication remote code execution in several popular Java products. It was disclosed and patched on November 17, 2026.

Which Java versions are affected by Java4Shell?

OpenJDK 17.0.6 and later on the 17 line, and the 21, 25, and 27 lines, before the November 17, 2026 updates. Standard Java 8 and 11 are not listed as affected, but Oracle’s Java 8 Enterprise Performance Pack (8u511b33-perf) is. Oracle’s fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1, and 8u513-perf. Other distributions such as Temurin, Corretto, Zulu, and Red Hat OpenJDK ship the fix under their own version numbers.

Is my server affected by Java4Shell if it runs on ARM or an older CPU?

No. The vulnerable code path is only used on x86-64 CPUs that report the avx512f, avx512bw, avx512vbmi, and bmi2 flags, such as Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids, and Granite Rapids, and AMD Zen 4 or newer. ARM64 hosts, including AWS Graviton, are not affected. You should still patch, because workloads move between instance types.

How do I mitigate Java4Shell without upgrading Java?

Start the JVM with -XX:-UseBASE64Intrinsics, which disables the vulnerable accelerated decoder, and confirm it took effect with jcmd <pid> VM.flags -all. -XX:UseAVX=2 also works on x86-64 but has a wider performance impact and prevents the JVM from starting on ARM. Upgrading Spring Boot, Tomcat, or Jetty does not fix the bug; only a patched JDK does.

Is Java4Shell being exploited in the wild?

As of November 18, 2026 there were no public reports of exploitation and the CVE was not in CISA’s Known Exploited Vulnerabilities catalog. However, details leaked before the coordinated release, a public proof of concept triggers the bug, and at least one researcher has built a working application-specific exploit, so treat it as urgent.

Can a DAST scanner detect Java4Shell?

Not reliably. Exploitation depends on CPU, JIT state, and heap layout, so the right check is your JDK version, CPU flags, and JVM flags. API DAST tools such as DastPilot help in other ways: they map which endpoints accept Basic auth, JWTs, and other Base64 input before authentication, send malformed values, and flag 5xx errors and auth checks that fail open after a runtime upgrade.

Know exactly what anonymous users can reach

DastPilot maps your pre-auth API surface, sends malformed and tampered credentials to every documented endpoint, and rechecks after every runtime upgrade. 30-day free trial, no credit card required.