Security
BlogsSecurity

Java4Shell (CVE-2026-114938): Pre-Auth RCE in Java’s Base64 Decoder

Sandeep
Founder
A black and white photo of a calendar.
Updated:
November 18, 2026
•
A black and white photo of a clock.
12
mins read
Written by
Sandeep
, Reviewed by
Sandeep
A black and white photo of a calendar.
Updated:
November 18, 2026
•
A black and white photo of a clock.
12
mins read
Java4Shell (CVE-2026-114938): Pre-Auth RCE in Java’s Base64 Decoder
On this page
Share

Java4Shell (CVE-2026-114938) is a memory-corruption flaw in the JVM’s hardware-accelerated Base64 decoder that researchers have turned into unauthenticated remote code execution against Jira, Confluence, Jenkins, Keycloak, JFrog Artifactory and PingFederate. Oracle and the OpenJDK project shipped fixes on November 17, 2026. If you run Java 17.0.6 or later on a modern Intel Xeon or AMD Zen 4 server, assume you are in scope until you prove otherwise.

The name invites comparison with Log4Shell, and the comparison is half right. Like Log4Shell, the bug sits in a component nearly every Java application touches, and attacker input reaches it before any login check runs. Unlike Log4Shell, there is no one-line payload that works everywhere: each target needs its own memory layout and timing. That makes mass exploitation slower to arrive, but it also means a quiet, targeted attacker has a long runway against teams that wait for a public exploit before patching.

This post walks through the root cause, the exploitation chain as the researchers describe it, exactly which builds are affected, a safe proof of concept you can run to verify your own exposure, and how to hunt for attempts.

Key Takeaways

  • What: an out-of-bounds write of 62 to 63 bytes in the AVX-512 VBMI Base64 intrinsic, triggered by malformed input ending in an extra =.
  • Who: Java 17.0.6+, 21, 25 and 27 (plus some GraalVM and Java 8 Performance Pack builds) running on x86-64 CPUs with AVX-512 VBMI.
  • Severity: 9.2 under CVSS 4.0 per the discoverers, 8.1 under CVSS 3.1 per Oracle, 9.8 preliminary per Red Hat.
  • Fix: move to the new .1 releases (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1) or vendor equivalents, then restart services and rebuild containers.
  • Stopgap: start the JVM with -XX:-UseBASE64Intrinsics.

What is Java4Shell?

Java4Shell is an integer underflow in the padding-handling logic of HotSpot’s x86-64 Base64 decode intrinsic, which turns into a heap out-of-bounds write. It was found by Quang Luong of Calif, who says an AI coding agent surfaced the candidate bug in about an hour and the first working exploit took two more.

Why a memory-safe language has a memory bug

Java’s memory safety applies to Java bytecode, not to the runtime underneath it. Hot paths in the JDK are replaced at runtime by intrinsics: hand-written machine code that the C2 JIT compiler swaps in once a method runs often enough. For Base64, HotSpot ships an intrinsic (generate_base64_decodeBlock) that uses AVX-512 VBMI vector instructions to decode up to 64 bytes per operation. That code is assembly, and assembly has no bounds checks.

The intrinsic arrived on the Java 17 line in 17.0.6, released in January 2023, according to GreyNoise’s event timeline. The vulnerable code has therefore been running in production for almost four years.

The bug, step by step

The decoder processes input in 256-byte blocks, then 64-byte blocks, then a short tail. For the tail it builds two bitmasks with the BZHI instruction: one saying which input bytes to read, one saying which output bytes to write. A masked store (VMOVDQU8) then writes only the bytes whose mask bit is set.

The tail logic computes an output length of (input_length / 4) * 3, then subtracts one for each trailing =. If the remaining tail is so short that the output length is already zero, for example a lone =, the subtraction underflows to -1 or -2. BZHI treats any index of 64 or above as “keep every bit”, so the output mask becomes all ones. The masked store then writes a full 64 bytes.

In practice, that means a string of otherwise valid Base64 with one stray = on the end makes Java allocate a correctly sized result array and then spray roughly 62 to 63 bytes past its end. Java’s own validation runs afterwards and throws IllegalArgumentException. By then, whatever object sat next to the array on the heap has already been overwritten.

Why it was first read as a crash bug

The overflowing bytes are not attacker-chosen. Calif’s analysis shows the attacker controls the first in-bounds byte fully and a few bits of the second; everything past that is fixed garbage, ending in a constant 0x9a fill. Only where the write lands can be steered, via the input length and heap layout. Early reviews of the patch therefore read Java4Shell as a denial-of-service bug, as The Hacker News noted. Calif’s contribution was showing that a fixed-value overflow is enough.

From fixed bytes to code execution

Calif turned a fixed-value overflow into remote code execution by corrupting array lengths, a technique borrowed from browser JavaScript-engine exploitation. Their application-specific chains remain private, but the general strategy is public, and defenders should understand its shape because it determines what is and is not a mitigation.

Why pre-auth matters here

Servers routinely decode Base64 before deciding who you are. HTTP Basic Authorization headers, SAML artifacts and responses, CSRF tokens, session blobs and many SSO handshakes all pass through java.util.Base64.Decoder on the way to an authentication check. So an anonymous request can drive attacker-shaped input into the vulnerable intrinsic. Calif also reports a client-side variant from researcher samczsun, in which a Java program that merely opens a TLS connection to a malicious server can be compromised.

The stages, as the researchers describe them

  1. Warm up. Send valid Base64 repeatedly until C2 compiles the decoder and switches to the AVX-512 intrinsic. Nothing is corrupted yet, which makes this phase look like ordinary traffic.
  2. Groom the heap. Arrange for the decoder’s output array to sit directly before a “writer” array. HotSpot gives each thread a private allocation buffer (TLAB), so the attacker forces critical allocations onto the shared path and then sprays many writer/reader pairs, retrying until one lines up.
  3. Time the allocations remotely. Requests are delivered in pieces and held open, with the final bytes released together, so allocation order is controlled even though the attacker cannot choose addresses. This is why network latency and proxy buffering affect reliability.
  4. Trigger. The malformed tail spills its fixed bytes across the writer’s length field, enlarging it.
  5. Disclose (“JavaBleed”). The oversized writer now accepts attacker-chosen bytes past its real end. These enlarge a second “reader” array whose contents flow back into the HTTP response, leaking heap memory such as keys, tokens and PII.
  6. Repair and finish. Leaked originals are used to repair corrupted headers so the JVM survives. The bounded write is escalated to an arbitrary write that reaches the JIT code cache or JVM hooks.

What this means for defenders

Three properties of this chain shape your response. First, there is no universal payload: each product needs a bespoke heap profile, so signature-based scanners will lag. Second, memory disclosure comes before RCE: even a failed or partial attack can leak secrets, so treat crashes on exposed hosts as possible data exposure, not just availability incidents. Third, failure is cheap: a misaligned attempt usually crashes the JVM, which orchestration then restarts, giving the attacker another try.

Independent labs have confirmed the primitives but not full RCE. One reproduced the corruption on an AWS Intel Ice Lake host. Blackpoint Cyber crashed a Spring Boot test app with about 28,300 unauthenticated malformed logins in about 20 seconds, and read an adjacent secret via JavaBleed in all 30 local runs, according to The Hacker News.

Which versions are vulnerable?

You are exposed only when three conditions hold at once: an affected JDK build, an x86-64 CPU with AVX-512 VBMI, and an application path that feeds untrusted Base64 into the standard decoder. Miss any one and the vulnerable instructions never execute.

1. Affected Java builds

The bug exists in OpenJDK 17.0.6 and later on the 17 line, and in every release of Java 21, 25 and 27 before this week’s fixes. Standard Java 8 and Java 11 do not contain the intrinsic. Because nearly every distribution is built from OpenJDK, Calif lists Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle OpenJDK, Oracle Java SE and Oracle GraalVM as affected.

Java buildAffected versionsFixed release
Oracle Java SE 1717.0.6 to 17.0.21.0.317.0.21.1
Oracle Java SE 2121.0.13.0.3 and earlier21.0.13.1
Oracle Java SE 2525.0.5.0.3 and earlier25.0.5.1
Oracle Java SE 2727.0.1.0.3 and earlier27.0.1.1
Oracle Java SE 8 Performance Pack8u511b33-perf8u513
Oracle GraalVM for JDK 17 / 2117.0.21.0.3 / 21.0.13.0.317.0.21.1 / 21.0.13.1
GraalVM Enterprise Edition21.3.20.0.321.3.20.1
Amazon Corretto 17, 21, 25, 27Earlier builds (from 17.0.6 on for 17)17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4
Azul Zulu 17, 21, 25, 27Earlier builds (from 17.0.6 on for 17)17.70.201, 21.54.201, 25.38.201, 27.30.201
Red Hat build of OpenJDK 17, 21, 25; RHEL 8, 9, 1017.0.6 and later, 21, 25Not yet released
Eclipse Temurin, Microsoft OpenJDK, BellSoft LibericaBuilt from affected OpenJDKNot yet listed as of Nov 18

SAP has shipped SapMachine 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, though its release pages do not say what they fix. Products that bundle their own JRE (many Atlassian, JFrog and Ping deployments, appliances, and desktop tools) need an update from that vendor, not just from your OS.

2. Affected hardware

The intrinsic runs only when the CPU exposes AVX-512F, AVX-512BW, AVX-512VBMI and BMI2. Other CPUs fall back to a decode path that does not contain the defect. In practice, that covers:

  • Intel Xeon: Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids. These underpin a large share of current AWS, Azure and GCP x86 instance families.
  • AMD EPYC and Ryzen: Zen 4 or newer.
  • Not affected: ARM64 (AWS Graviton, Ampere, Apple Silicon), older Xeons, and most Intel client chips since 12th-gen Alder Lake, where AVX-512 is fused off, per VulnCheck.

This creates a nasty operational trap: the same container image can be safe on one node and vulnerable on the next. An autoscaling group that mixes instance generations, or a Kubernetes cluster with heterogeneous node pools, will have partial exposure that image scanners cannot see.

3. Affected applications

Calif demonstrated RCE in default configurations of the following products. Both lists are explicitly incomplete, and Calif also reached RCE in sample apps built on Spring Boot and Apache Struts.

Exploitable without loginExploitable with a login
KeycloakApache Kafka Broker
Atlassian JiraApache Solr
Atlassian ConfluenceElasticsearch
JFrog ArtifactoryGerrit
JenkinsSpinnaker
PingFederate—

Note what these have in common: identity providers, CI/CD, source control, artifact repositories and wikis. These are the systems that hold credentials, signing keys and build pipelines, which makes them ideal footholds for supply-chain attacks.

Severity scores at a glance

Calif scores the flaw 9.2 under CVSS 4.0. Oracle gives 8.1 under CVSS 3.1, rating it hard to exploit but needing no login. Red Hat’s preliminary score is 9.8, Amazon’s is 8.8. Canada’s Cyber Centre has issued an alert describing it as remotely exploitable without authentication. As of November 18 it is not in CISA’s KEV catalog, and no in-the-wild exploitation has been reported.

Proof of concept: verify your exposure safely

The right proof of concept for a defender is one that proves your servers are in or out of scope without corrupting anything. The checks below are read-only: they inspect the CPU, the JDK build and the live JVM flags, and they send no malformed input. Weaponized chains are not published by the researchers, and you do not need one to make a patch decision.

Step 1: Check the host CPU

All four flags must be present for the vulnerable intrinsic to run.

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

Four lines of output means the hardware condition is met. Fewer means the JVM on this host uses the safe fallback path.

Step 2: Check every running JVM

This script combines the CPU check with the version and Base64-intrinsic status of each live Java process. Run it as root, or as the user that owns the JVMs, so jcmd can attach.

#!/usr/bin/env bash
# java4shell-exposure-check.sh  (read-only, CVE-2026-114938)
set -u

cpu_ok=1
for f in avx512f avx512bw avx512vbmi bmi2; do
  grep -m1 '^flags' /proc/cpuinfo | grep -qw "$f" || cpu_ok=0
done
echo "CPU meets AVX-512 VBMI condition: $([ $cpu_ok = 1 ] && echo YES || echo no)"

for pid in $(pgrep -x java); do
  ver=$(jcmd "$pid" VM.version 2>/dev/null | grep -m1 -Eo 'JDK [0-9][0-9.+_a-z-]*')
  b64=$(jcmd "$pid" VM.flags -all 2>/dev/null | awk '/ UseBASE64Intrinsics /{print $4}')
  avx=$(jcmd "$pid" VM.flags -all 2>/dev/null | awk '/ UseAVX /{print $4}')
  cmd=$(ps -o args= -p "$pid" | cut -c1-60)
  verdict="check version"
  { [ "$cpu_ok" = 0 ] || [ "$b64" = false ] || [ "${avx:-3}" -lt 3 ]; } && verdict="not exploitable on this host"
  printf '%-7s %-22s b64=%-5s avx=%-2s %-28s %s\n' \
    "$pid" "${ver:-unknown}" "${b64:-?}" "${avx:-?}" "$verdict" "$cmd"
done

Read the output against the version table above. A process on an AVX-512 VBMI host, running an unpatched 17.0.6+, 21, 25 or 27 build, with b64=true and avx=3, is exposed.

Step 3: Self-report from inside the application

Containers often lack jcmd. This small class, dropped into a health or admin endpoint, reports the same facts from inside the JVM using the standard HotSpot diagnostic MXBean.

import com.sun.management.HotSpotDiagnosticMXBean;
import java.lang.management.ManagementFactory;

public final class Java4ShellSelfCheck {
    public static String report() {
        var vm = ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
        return "runtime=" + System.getProperty("java.runtime.version")
             + " arch=" + System.getProperty("os.arch")
             + " UseBASE64Intrinsics=" + opt(vm, "UseBASE64Intrinsics")
             + " UseAVX=" + opt(vm, "UseAVX");
    }
    private static String opt(HotSpotDiagnosticMXBean vm, String name) {
        try { return vm.getVMOption(name).getValue(); }
        catch (IllegalArgumentException e) { return "n/a"; } // e.g. UseAVX on ARM64
    }
    public static void main(String[] a) { System.out.println(report()); }
}

UseAVX=3 means AVX-512 is active. UseBASE64Intrinsics=false or UseAVX of 2 or less means the mitigation flag is in place.

Step 4: Find mixed fleets

In Kubernetes, the node is what decides exposure, not the image. If you run Node Feature Discovery, list the nodes that advertise the instruction set:

kubectl get nodes -l feature.node.kubernetes.io/cpu-cpuid.AVX512VBMI=true \
  -o custom-columns=NODE:.metadata.name,TYPE:.metadata.labels.node\.kubernetes\.io/instance-type

Any Java workload that can schedule onto those nodes needs a patched image or the mitigation flag in its JAVA_TOOL_OPTIONS.

A script to check your fleet

The checks above answer one host at a time. The Python script below rolls them into one read-only tool: point it at a list of servers and it prints EXPOSED, SAFE or UNKNOWN for each, writes a CSV, and exits with code 2 if anything is exposed so you can wire it into CI or a cron sweep. It reads the CPU, the JDK build and the JVM flags over SSH and sends no malformed input, so it is safe to run against production.

#!/usr/bin/env python3
"""java4shell_check.py - CVE-2026-114938 exposure checker (read-only).

Reports EXPOSED / SAFE / UNKNOWN from three local facts: CPU features,
JDK build, and JVM flags. Sends no malformed input; never triggers the bug.

  sudo ./java4shell_check.py                      # this host
  ./java4shell_check.py --hosts hosts.txt --csv out.csv --jobs 20
Exit code is 2 if any host is EXPOSED, else 0 - handy for CI or cron.
"""
import argparse, csv, re, shutil, subprocess, sys
from concurrent.futures import ThreadPoolExecutor, as_completed

FLAGS = ("avx512f", "avx512bw", "avx512vbmi", "bmi2")

def run(cmd, ssh=None):
    full = (["ssh", "-o", "BatchMode=yes", ssh] + cmd) if ssh else cmd
    try:
        return subprocess.run(full, capture_output=True, text=True, timeout=25).stdout
    except (subprocess.SubprocessError, OSError):
        return ""

def version_affected(ver):            # 17.0.6+, and all 21 / 25 / 27
    m = re.search(r"(\d+)\.(\d+)\.(\d+)", ver)
    if not m: return None
    major, minor, patch = int(m[1]), int(m[2]), int(m[3])
    if major == 17: return (minor, patch) >= (0, 6)
    return True if major in (21, 25, 27) else False

def check_host(host):
    ssh = None if host == "localhost" else host
    flags = set(run(["grep", "-m1", "^flags", "/proc/cpuinfo"], ssh).split())
    if not all(f in flags for f in FLAGS):
        return [(host, "-", "-", "SAFE", "CPU lacks AVX-512 VBMI")]
    has_jcmd = bool(run(["sh", "-c", "command -v jcmd"], ssh).strip()) if ssh \
        else shutil.which("jcmd")
    if not has_jcmd:
        return [(host, "-", "-", "UNKNOWN", "jcmd not found")]
    pids = run(["pgrep", "-x", "java"], ssh).split()
    if not pids:
        return [(host, "-", "-", "SAFE", "no running java")]
    rows = []
    for pid in pids:
        mv = re.search(r"JDK\s+([0-9][0-9.+_a-z-]*)", run(["jcmd", pid, "VM.version"], ssh))
        ver = mv.group(1) if mv else "unknown"
        fl = run(["jcmd", pid, "VM.flags", "-all"], ssh)
        b64 = (re.search(r"UseBASE64Intrinsics\s*=?\s*(\w+)", fl) or [None, "?"])[1]
        avx = (re.search(r"UseAVX\s*=?\s*(\d+)", fl) or [None, "?"])[1]
        aff = version_affected(ver)
        if b64 == "false" or (avx.isdigit() and int(avx) < 3):
            v, note = "SAFE", "mitigation flag in place"
        elif aff is True:  v, note = "EXPOSED", "affected build on vulnerable CPU"
        elif aff is False: v, note = "SAFE", "build not in affected range"
        else:              v, note = "UNKNOWN", f"version '{ver}'"
        rows.append((host, pid, ver, v, note))
    return rows

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--hosts", help="file of user@host lines to check over SSH")
    ap.add_argument("--jobs", type=int, default=10)
    ap.add_argument("--csv")
    args = ap.parse_args()
    targets = ["localhost"]
    if args.hosts:
        targets = [l.strip() for l in open(args.hosts)
                   if l.strip() and not l.startswith("#")]
    rows = []
    with ThreadPoolExecutor(max_workers=args.jobs) as pool:
        for fut in as_completed([pool.submit(check_host, t) for t in targets]):
            rows += fut.result()
    rows.sort(key=lambda r: (r[3] != "EXPOSED", r[0]))
    for host, pid, ver, v, note in rows:
        print(f"{v:<8} {host:<22} pid {pid:<7} {ver:<18} {note}")
    if args.csv:
        with open(args.csv, "w", newline="") as fh:
            csv.writer(fh).writerows(
                [("host", "pid", "version", "verdict", "note")] + rows)
    exposed = sum(r[3] == "EXPOSED" for r in rows)
    print(f"\n{exposed} exposed / {len(rows)} checked. No malformed input was sent.")
    sys.exit(2 if exposed else 0)

if __name__ == "__main__":
    main()

Run it on one host with sudo ./java4shell_check.py, or across a fleet with ./java4shell_check.py --hosts hosts.txt --csv out.csv --jobs 20, where hosts.txt has one user@host per line. A host shows EXPOSED only when all three conditions line up: an AVX-512 VBMI CPU, an affected JDK build, and no mitigation flag. Treat UNKNOWN as "go look" rather than safe.

Reproducing the bug itself

Calif has published a bounded, local-only trigger in its write-up that keeps every stray write inside an oversized array and prints whether the JVM is affected. If you need empirical confirmation, run it only in an isolated lab JVM on matching hardware. Never fire malformed Base64 at production or at systems you do not own: on a real heap the same input corrupts live objects and can crash the service.

Patching and workarounds

Upgrade to a fixed JDK build, restart every JVM, and rebuild every container image. Installing the package is not enough: a running JVM keeps executing the old intrinsic until it restarts, and a container keeps its old JDK until the image is rebuilt and redeployed.

Priority order

  1. Internet-facing, pre-auth targets on AVX-512 VBMI hosts. Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate first, then any custom app that decodes Basic auth, SAML or tokens before login.
  2. Identity and CI/CD systems on internal networks. They hold the credentials an attacker needs to move laterally, and “internal” rarely means unreachable.
  3. Authenticated data platforms. Kafka, Solr, Elasticsearch, Gerrit, Spinnaker.
  4. Java clients that open outbound TLS connections, given the client-side variant Calif reports.
  5. Everything else on the affected JDK lines, including batch jobs and internal tools.

Where to get fixes

Oracle’s fixed builds are the new .1 releases listed in its November 2026 Critical Patch Update. The OpenJDK advisory covers upstream. Amazon Corretto and Azul Zulu have shipped fixes; Red Hat’s are pending per its security bulletin, and containers based on Red Hat images will need a rebuild once updated base images land. For Temurin, Microsoft and Liberica, watch the vendor channels and fall back to the flag below until they publish.

Temporary mitigation flags

If you cannot upgrade today, add one of these to the JVM’s startup options. Both stopped the overflow on every affected version independent testers tried.

FlagEffectCaveat
-XX:-UseBASE64IntrinsicsDisables only the hardware-accelerated Base64 code. Other AVX-512 speedups stay on.Recommended choice. Negligible cost for most apps, which decode small strings.
-XX:UseAVX=2Disables AVX-512 entirely.x86-64 only: an ARM64 JVM refuses to start with it. Can slow crypto and vector-heavy workloads.

Testers also warn that -XX:DisableIntrinsic=_base64_decodeBlock used on its own stops the JVM from starting, so do not reach for it. The simplest fleet-wide rollout is usually JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics, which every HotSpot JVM reads at startup. Remove the flag once the fixed build is deployed, and verify it took effect with the Step 2 or Step 3 checks above.

What does not reliably help

A reverse proxy that buffers whole request bodies, such as nginx’s default, breaks some of Calif’s chains because it removes the attacker’s control over allocation timing. It is not a fix: the Elasticsearch chain works from one complete request, and WebSocket traffic bypasses body buffering after the upgrade. Likewise, a WAF rule for malformed Base64 is a useful tripwire but easy to dodge, because Base64 travels in headers, cookies, JSON fields, form bodies and protocol messages a WAF may not parse.

Detection and threat hunting

No public exploitation had been reported as of November 18, and GreyNoise’s tracker showed zero successful intrusions. That window will not last. None of the signals below proves compromise, and their absence does not prove safety.

Signals to hunt for

  • Malformed tokens in headers. Base64 values of 32 or more characters that end in = and whose length is not a multiple of 4, especially in Authorization: Basic headers, SAML parameters and CSRF fields. Legitimate encoders always pad to a multiple of 4.
  • Decoder exception bursts. Sudden spikes of IllegalArgumentException thrown from java.util.Base64$Decoder. A single malformed header is noise; thousands per minute from one source is a grooming attempt.
  • Warm-up traffic. A high volume of valid Base64 requests to one endpoint from one source, immediately before the malformed ones. Attackers need the JIT to compile the decoder first.
  • Unexplained JVM crashes. New hs_err_pid*.log files, container restart loops or OOM-like exits on AVX-512 hosts. Each failed exploitation attempt typically crashes the JVM.
  • Odd request pacing. Many slow, partially sent requests held open from the same client, then released together.

Quick hunting commands

Count decoder exceptions per minute in an application log, to spot bursts:

grep -E 'IllegalArgumentException' app.log | grep -i 'base64' \
  | awk '{print $1" "substr($2,1,5)}' | sort | uniq -c | sort -rn | head -20

Find recent JVM crash dumps across a host:

find / -xdev -name 'hs_err_pid*.log' -newermt '2026-11-01' 2>/dev/null -exec ls -l {} +

Flag suspicious Basic-auth values at a gateway or in a log pipeline that captures headers:

import re

B64 = re.compile(r'^[A-Za-z0-9+/]+=*$')

def java4shell_suspicious(value: str) -> bool:
    """Heuristic for CVE-2026-114938 probing: long Base64 with bad padding."""
    return (len(value) >= 32 and value.endswith('=')
            and len(value) % 4 != 0 and bool(B64.match(value)))

Adjust the awk field positions to your log format. Treat any hit on an exposed AVX-512 host as an incident: preserve crash logs and heap dumps, and rotate secrets that lived in that JVM’s memory, since JavaBleed can leak them before any code runs.

Why scanners miss Java4Shell, and what it means for the business

Java4Shell is a vulnerability that version-based tooling will consistently under- or over-report, because exposure depends on runtime facts no SBOM records. An image scanner sees “OpenJDK 21.0.5” and flags it, but cannot know whether the pod lands on a Graviton node (safe) or a Sapphire Rapids node (exposed). It cannot see whether JAVA_TOOL_OPTIONS disables the intrinsic, or whether any reachable endpoint decodes attacker input. The result is either alert fatigue across thousands of findings or false confidence in the ones marked low.

The questions that actually decide risk are attacker questions:

  • Which of my internet-facing hosts run Java on AVX-512 VBMI hardware right now?
  • Which of those expose an endpoint that decodes Base64 before authentication?
  • Which bundled-JRE products (Jira, Artifactory, PingFederate, vendor appliances) did my OS patching miss?
  • If an attacker reached that JVM’s memory, what keys, tokens and customer data would they read?
  • From that foothold, how far could they move: into CI/CD signing keys, the identity provider, production databases?

The business stakes

The applications named so far are not peripheral. Keycloak and PingFederate are front doors for workforce and customer identity. Jenkins, Artifactory and Gerrit sit at the heart of the software supply chain. Jira and Confluence hold architecture diagrams, incident notes and, all too often, credentials pasted into tickets. A compromise of any of them is a breach of the systems that protect everything else.

There are also regulatory clocks to consider. Under rules such as the SEC’s cyber-incident disclosure requirements, GDPR’s 72-hour breach notification and DORA for financial entities, a heap leak that exposes customer PII is reportable even if code execution never succeeds. “We were waiting for a public exploit” is not a defensible position when the vendor patch, a mitigation flag and a detailed write-up all shipped on day one.

Finally, there is the speed problem. Calif reports finding this bug in about an hour and building the first exploit in two more, with AI doing much of the later chain-building almost autonomously. Attackers have the same tools. The gap between disclosure and weaponization is shrinking, and an annual pentest cycle cannot keep pace with that.

AppSecure Security

Patching closes today’s hole. Knowing your real attack surface is what lets you close the next one in hours instead of weeks. That is what AppSecure’s Agentic Penetration Testing Platform is built for: AI agents that think like an attacker, guided by human security experts, testing continuously across your attack surface, your business logic and your applications.

For a vulnerability like Java4Shell, that means answering the questions scanners cannot:

  • Attack surface: discover every internet-facing asset and Java service you own, including the forgotten Jenkins box, the shadow Keycloak instance and the vendor appliance with its own bundled JRE.
  • Applications: trace which endpoints accept Base64 before authentication (Basic auth, SAML, tokens, file uploads) and validate whether attacker input actually reaches the vulnerable decoder.
  • Business impact: map what an attacker could reach from that foothold, from CI/CD secrets to your identity provider and customer data, so you fix what matters most first.
  • Continuous retesting: confirm the patch or mitigation flag actually took effect on every node, and stay covered as new infrastructure, releases and CVEs arrive.

Java4Shell will not be the last bug in code you never knew you were running. Make sure the next one finds you ready. Book your AppSecure agentic pentest.

Frequently Asked Questions

1. What is Java4Shell (CVE-2026-114938)?

Java4Shell is a heap out-of-bounds write in the AVX-512 VBMI Base64 decode intrinsic used by OpenJDK’s HotSpot JVM. Malformed Base64 ending in a stray = causes the decoder to write roughly 62 bytes past its output array. Researchers at Calif turned that write into memory disclosure and remote code execution against several widely used Java applications.

2. Which Java versions are affected by Java4Shell?

OpenJDK 17.0.6 and later on the 17 line, plus Java 21, 25 and 27 before the November 2026 fixes, along with distributions built from them. Standard Java 8 and 11 are not affected, though the Oracle Java SE 8 Performance Pack build 8u511b33-perf and some GraalVM builds are.

3. Am I vulnerable if my servers run on ARM64?

No. The vulnerable code runs only on x86-64 CPUs that support AVX-512F, AVX-512BW, AVX-512VBMI and BMI2, such as Intel Xeon Ice Lake and newer or AMD Zen 4 and newer. ARM64 hosts, including AWS Graviton, use a different decode path.

4. How do I mitigate Java4Shell if I cannot patch today?

Start the JVM with -XX:-UseBASE64Intrinsics, which disables only the vulnerable Base64 fast path. On x86-64 hosts, -XX:UseAVX=2 also works but disables all AVX-512 optimizations. Restart the JVM for either flag to take effect, and remove it once a fixed build is deployed.

5. Has Java4Shell been exploited in the wild?

As of November 18, 2026, no in-the-wild exploitation had been reported and the flaw was not in CISA’s KEV catalog. Calif is withholding its product-specific exploits for now, but the root cause and general technique are public, so patch on the assumption that working exploits will follow.

Sandeep

Founder & CEO @ Appsecure Security

Protect Your Business with Hacker-Focused Approach.

Loved & trusted by Security Conscious Companies across the world.
Stats

The Most Trusted Name In Security

450+
Companies Secured
7.5M $
Bounties Saved
4800+
Applications Secured
168K+
Bugs Identified
Accreditations We Have Earned
crest logo white
AICPA SOC 2 badge logo

Protect Your Business with Hacker-Focused Approach.