Blog
securityjavacveopenjdkkafkatrinooperations

Inside Java4Shell (CVE-2026-114938) — Impact Assessment and Response for Data Platform Operators

How an AVX-512 optimisation bug in OpenJDK's Base64 decoder leads to remote code execution, and how to tell whether your Kafka, Spark, Trino, NiFi and Elasticsearch clusters are affected, mitigate, and patch.

Data DynamicsNovember 23, 202614 min read

On 17 November 2026, Oracle and OpenJDK fixed CVE-2026-114938, a vulnerability in the Java runtime. The security firm Calif, which found it, named it Java4Shell. The name recalls 2021's Log4Shell, and it arrived with demonstrations of unauthenticated remote code execution against products such as Keycloak, Jira and Jenkins.

The nature of the bug is quite different, though. Log4Shell was a library bug, so almost every Java application using Log4j was in scope. Java4Shell needs three things to line up: the JDK version, the CPU model and the JVM options. Within one Kafka cluster, some nodes may be vulnerable and others not.

Based on Calif's write-up, analyses from Datadog, Dynatrace, Tenable and VulnCheck, and the official responses of Databricks, Elastic, Trino and Keycloak (checked on 2026-11-23), this post explains how data platform operators can determine whether their environment is affected and what to do about it. If you only need the action items, see our DD-ADV-2026-0004 security advisory (in Korean).

TL;DR: Java4Shell only works when Java 17.0.6+ / 21 / 25 / 27, an x86-64 CPU with AVX-512 VBMI, and default JVM options all coincide. Java 8 and 11 and ARM64 servers are not affected. Replacing the JDK with a fixed build (17.0.21.1 / 21.0.13.1 / 25.0.5.1 / 27.0.1.1) is the real fix; if you cannot do that yet, start the JVM with -XX:-UseBASE64Intrinsics to switch off the vulnerable path.

At a glance

ItemDetails
CVECVE-2026-114938 (Java4Shell)
TypeMemory corruption via a heap out-of-bounds write
LocationThe Base64 decoding intrinsic of the x86-64 HotSpot JVM
AffectedUnpatched builds of Java 17 (17.0.6 and later), 21, 25, 27
Not affectedStandard Java 8 and 11, ARM64 (AWS Graviton etc.), CPUs without AVX-512 VBMI
Fixed in17.0.21.1 / 21.0.13.1 / 25.0.5.1 / 27.0.1.1 (released 2026-11-17)
SeverityOracle CVSS 3.1 8.1 (High), Calif CVSS 4.0 9.2 (Critical)
ExploitationAs of reports on 2026-11-22: no confirmed compromise, not in CISA KEV; scanning and attempts observed
Mitigation-XX:-UseBASE64Intrinsics (or -XX:UseAVX=2)

There are two scores because the methods differ: Oracle rates attack complexity as high and arrives at 8.1, while Calif scores 9.2 under CVSS 4.0. As we will see, the common view is that "crashing is easy, code execution is hard", so both have a point.

Root cause: a length of -1 that writes 64 bytes

What an intrinsic is

java.util.Base64 is written in plain Java. But once a method is called hundreds of thousands of times, HotSpot's C2 JIT compiler swaps it for a hand-written machine-code routine that uses CPU-specific instructions — an intrinsic. On recent x86-64 CPUs, a routine that uses AVX-512 VBMI instructions to decode 64 bytes at a time is used. Java's bounds checks do not apply inside that routine, so a bug there breaks Java's memory safety outright.

The bug

Putting Calif's and Datadog Security Labs' analyses together:

  1. The AVX-512 routine processes input in 64-byte blocks, and a separate tail handler deals with the final fragment of fewer than 64 bytes.
  2. The tail handler computes the output length as (input length / 4) × 3 and then decrements it once for each trailing = padding character — without checking whether it goes negative.
  3. When the fragment is all padding, the output length becomes -1 (or -2).
  4. The bzhiq instruction that builds the write mask from this length only looks at its low byte. -1 is read as 255 and -2 as 254, both wider than 64 bits, so every bit of the mask stays set.
  5. The masked store then writes all 64 bytes, overwriting up to 62 bytes past the end of the output buffer.
Loading diagram…

In Calif's published reproducer, the path is reached with 64 A characters followed by one = on Java 21 and later, and 128 A characters plus = on Java 17. The overwritten bytes are not values an attacker can freely choose; they are mostly a fixed pattern. The two analyses describe the details slightly differently but agree that the values are constrained.

Catching the exception doesn't help

Because the input is malformed Base64, the Java code throws IllegalArgumentException. Applications usually catch it, treat it as "invalid token" and move on. But the memory write happens before the exception. In Datadog's experiment, the header of a neighbouring array was corrupted, and the JVM later crashed during garbage collection.

Which APIs are affected

Datadog confirmed on OpenJDK 17.0.6 that Base64.getDecoder() (basic) and Base64.getUrlDecoder() (URL-safe) take the AVX-512 path, while Base64.getMimeDecoder() does not. And because the intrinsic is used only after the JIT has compiled the method with C2, busier servers are more likely to meet the conditions.

Why it is reachable before authentication

Base64 is everywhere in web authentication:

  • HTTP Basic authentication headers (Authorization: Basic ...)
  • JWT headers, payloads and signatures
  • SAML responses
  • Session cookies and other tokens

These values are decoded in order to find out who the user is — so the decoder sees attacker input before any login succeeds. Keycloak's notice says as much: it processes Base64 in requests before authentication, so login does not protect an instance.

Calif lists the following demonstrations, noting that the list is not exhaustive.

CategoryProducts
Pre-auth remote code executionKeycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederate
Post-auth remote code executionApache Kafka broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker

The second row is the one data platform operators should notice. Kafka, Solr and Elasticsearch require an authenticated user, but they are often shared by many teams on an internal network, so "post-auth" does not mean "safe".

Datadog also points out the flip side: an application is exposed only if it passes the attacker's value straight to the JDK decoder. Libraries with their own Base64 implementation, or that validate and normalise input first, may behave differently.

How dangerous is it in practice

Sources differ in emphasis, so it helps to put them side by side.

SourceAssessment
CalifStresses remote code execution and heap memory disclosure. Says it used remote heap-grooming techniques; application-specific chains will be published after a patching window
Datadog, DynatraceThe most readily achievable outcome is a JVM crash (denial of service); reliable code execution needs application-specific work
VulnCheckCrashing is "trivial", but code execution needs substantial heap grooming plus a separate memory-disclosure path; not expected to be widely exploitable. Offers a working exploit to its paying customers
GreyNoise (via Tenable)Exploitation attempts observed, no successful compromise confirmed

In short: there is no off-the-shelf universal exploit yet, but taking a service down is easy. On a data platform, a Kafka broker or Trino coordinator that keeps crashing is already a major outage — and working code-execution exploits do exist, if only commercially for now.

Assessing your data platform

Step 1: the three conditions

ConditionHow to checkAffected when
① JDK versionJVM version of the running processAn unpatched 17 (17.0.6+), 21, 25 or 27 build
② CPUavx512vbmi flag in /proc/cpuinfoThe flag is present
③ JVM optionsValues of UseBASE64Intrinsics, UseAVXDefaults (intrinsic on, AVX-512 in use)

The CPU condition is reported to cover Intel Xeon from Ice Lake onwards (Sapphire Rapids, Emerald Rapids, Granite Rapids) and AMD from Zen 4 onwards. Lists vary between sources, and cloud hypervisors can hide CPU features, so checking the actual flag is more reliable than any generation list. Elastic, for instance, reports that under 5% of its Elastic Cloud Hosted deployments on Azure run on a vulnerable CPU: the answer differs by instance type even within one cloud.

Step 2: the baseline JDK of each component

ComponentBaseline JDK (from source, 2026-11-23)Verdict
Trino 484Java 25 requiredEvery node in scope; the official Docker image ships a pre-fix JDK
Apache NiFi 2.xJava 21In scope
Apache Kafka 4.xBrokers Java 17+ (clients 11+)Brokers in scope; not affected below 17.0.6
Apache Spark 4.xJava 17+Driver and executors in scope
ElasticsearchBundled JDK7.17.3 and later affected (Elastic notice)
Hadoop, Hive, HBase etc.Java 8, 11 or 17 depending on distribution and versionCheck the actual runtime JDK; not affected on 8 or 11

Trino deserves special attention. The latest release, Trino 484 (2026-10-16), requires Java 25, so there is no "our Java is too old to matter". The Trino project merged a change on 2026-11-18 that switches the Docker image's JDK to Amazon Corretto 25.0.5.1.2, but at the time of writing it has not yet shipped in a release. If you run the official image, add the mitigation flag to etc/jvm.config while you wait for the next release.

Step 3: checking with commands

CPU

# no output → no AVX-512 VBMI → not affected
grep -m1 -o -w avx512vbmi /proc/cpuinfo

The running JVM

java -version in a shell shows the default JDK on your PATH; the JDK a service actually uses may differ, so check the process itself.

jcmd -l                                         # list Java processes
jcmd <PID> VM.version                           # actual runtime version
jcmd <PID> VM.flags -all | grep -E 'UseBASE64Intrinsics|UseAVX'

On JRE-only images without jcmd, follow the process's executable path (/proc/<PID>/exe) and read that JDK's release file.

Many nodes at once

#!/usr/bin/env bash
# Collect the CPU flag and Java process versions from each node in hosts.txt.
while read -r host; do
  ssh -n "$host" '
    vbmi=$(grep -m1 -o -w avx512vbmi /proc/cpuinfo || echo none)
    for pid in $(pgrep -x java); do
      exe=$(readlink -f /proc/$pid/exe)
      ver=$(grep -m1 JAVA_VERSION= "$(dirname "$exe")/../release" 2>/dev/null)
      echo "$(hostname) cpu=$vbmi pid=$pid $ver exe=$exe"
    done
  '
done < hosts.txt

Containers and Kubernetes

kubectl exec <pod> -c <container> -- java -version
kubectl exec <pod> -c <container> -- sh -c 'grep -m1 -o -w avx512vbmi /proc/cpuinfo'

Containers use the host's CPU, so the same image can give different answers depending on which node it was scheduled on.

Interim mitigation: JVM options

If you cannot replace the JDK right away, switch off the vulnerable path with a start-up option.

OptionEffectCaveat
-XX:-UseBASE64Intrinsics (recommended)Disables only the Base64 intrinsicRecommended by Red Hat, AWS, Keycloak and Elastic; other AVX-512 optimisations stay on
-XX:UseAVX=2Disables AVX-512 use entirelyAffects other operations' performance; ARM64 JVMs don't recognise it and fail to start

No source publishes performance numbers. Base64 decoding falls back to plain Java, so if your workload decodes Base64 heavily, measure throughput in staging. Databricks, applying the mitigation to its runtimes, said it expects no meaningful performance impact.

Where to apply it, by component:

# Kafka (environment variable read by kafka-server-start.sh)
export KAFKA_OPTS="$KAFKA_OPTS -XX:-UseBASE64Intrinsics"
# Spark (spark-defaults.conf) — both driver and executors
spark.driver.extraJavaOptions    -XX:-UseBASE64Intrinsics
spark.executor.extraJavaOptions  -XX:-UseBASE64Intrinsics
# Trino — add one line to etc/jvm.config on every node
-XX:-UseBASE64Intrinsics
# NiFi — conf/bootstrap.conf (pick a number that doesn't clash with existing entries)
java.arg.50=-XX:-UseBASE64Intrinsics
# Elasticsearch — config/jvm.options.d/java4shell.options
-XX:-UseBASE64Intrinsics

The JDK_JAVA_OPTIONS environment variable applies an option to every JVM started by the java launcher in one go, but how each product merges existing options varies, so always confirm UseBASE64Intrinsics = false in jcmd <PID> VM.flags -all afterwards. For systems such as Spark that launch executors dynamically, check that newly started executors have it too.

Permanent fix: replace the JDK

Release lineFixed in
Java 1717.0.21.1
Java 2121.0.13.1
Java 2525.0.5.1
Java 2727.0.1.1
Java 18–20, 22–24, 26No fix (end of life); move to a supported line

Distributions ship at different times. According to public sources from around 2026-11-19, Amazon Corretto, Azul Zulu and Microsoft Build of OpenJDK had fixed builds; Eclipse Temurin was rolling out, starting with Linux; Ubuntu shipped fixes on 18 November; and Debian 12's openjdk-17 was still unfixed when checked. That lag is also why Trino switched its Docker image's JDK from Temurin to Corretto (per the PR, over the past two years Corretto shipped an average of 0.9 days after OpenJDK, Temurin 2.6 days).

Easy things to miss when replacing the JDK:

  • Bundled JDKs — products that ship their own JDK, such as Elasticsearch, are not fixed by an OS package update. Wait for the product's fixed release or replace the bundled JDK.
  • Container images — after updating the base image, rebuild the application image and redeploy it.
  • Restarts — replacing JDK files does not change a running JVM. Restart every JVM and re-check each process's version.
  • Managed services — Databricks has applied the mitigation across its platform; patched runtimes reach serverless automatically, but classic clusters need a restart by the customer.

Priorities

  1. Internet-facing services that decode Base64 before authentication — SSO/IdP (Keycloak etc.), Jenkins, Jira and Confluence, Artifactory, API gateways
  2. Internal services shared by many teams — Kafka brokers, Elasticsearch, Solr, Trino coordinators
  3. Batch workers and other JVMs — Spark executors, NiFi nodes, connectors

We recommend applying the mitigation flag to groups 1 and 2 today and replacing the JDK in your next maintenance window.

Timeline: five months as a public issue

Calif's timeline holds an interesting lesson (2026, US Pacific time).

DateEvent
9 JuneA user hits the crash in production and files an issue in Adoptium's support repository
8 SeptemberA crash reproducer is posted; the root cause is identified the same day
9 SeptemberA fix is proposed to OpenJDK — closed without being merged
24 OctoberCalif independently finds the bug with an AI coding agent (Codex) and reports it to Oracle
31 OctoberCalif sends Oracle pre-auth RCE PoCs for Jenkins and Keycloak
17 NovemberOracle and OpenJDK ship fixes; Calif publishes details; CISA issues an alert

The bug sat in a public issue tracker from June, and by September its root cause and a fix were public too — it just wasn't recognised as a security issue. Calif says it found the bug with AI in about an hour and built a first exploit in about two more hours. If public crash reports can be weaponised that quickly with AI, that is one more reason not to shrug off unexplained JVM crashes in production.

Wrapping up

  • Java4Shell only works on JDK 17.0.6+ / 21 / 25 / 27 + an AVX-512 VBMI CPU + default options. Java 8 and 11 and ARM64 servers are not affected.
  • On a data platform, check Trino (Java 25 required), NiFi 2.x (Java 21), Kafka brokers (Java 17+) and Spark 4.x first.
  • Today: apply -XX:-UseBASE64Intrinsics and restart. Next maintenance window: replace the JDK. Either way, you are done only when you have verified it per running process.

References