Back to Intelligence

CVE-2026-114938 (Java4Shell): OpenJDK Base64 Decoder RCE on AVX-512 CPUs — Detection and Remediation Guide

SA
Security Arsenal Team
November 20, 2026
13 min read

On November 17, 2026, researchers at Calif disclosed Java4Shell (CVE-2026-114938, CVSS 4.0: 9.2 Critical) — a memory-corruption vulnerability in OpenJDK's Base64 decoder that allows an unauthenticated attacker to achieve remote code execution by feeding malformed Base64 input to a vulnerable JVM. The flaw lives in the AVX-512–accelerated code path, which means exploitation is hardware-dependent: only systems running on CPUs with AVX-512 instruction set support (recent Intel Xeon Scalable generations and select AMD Zen 4/Zen 5 parts) execute the vulnerable intrinsic.

Do not let the hardware dependency lull you into a lower priority posture. AVX-512 is precisely where the compute-heavy workloads live — modern datacenter fleets, cloud instance families, API gateways, and high-throughput Java microservices. Any internet-facing Java application that decodes Base64 — which is to say virtually anything handling JWTs, Basic Auth headers, multipart payloads, SAML assertions, or serialized objects — is a candidate target. A 9.2-rated, unauthenticated, remote code execution flaw in the JVM's standard library demands immediate triage.

This post breaks down the vulnerability from a defender's perspective, gives you concrete detection logic for your SOC, and walks through patching and compensating controls, including a JVM flag workaround for environments that cannot patch this week.

Technical Analysis

What is affected

AttributeDetail
CVECVE-2026-114938
CVSS 4.09.2 (Critical)
ComponentOpenJDK java.util.Base64 decoder — AVX-512 intrinsic implementation
Attack vectorNetwork; unauthenticated; malformed Base64 input
Hardware dependencyCPUs with AVX-512 support (the vulnerable intrinsic only executes when the JVM selects the AVX-512 code path)
Affected runtimesOpenJDK builds that include the AVX-512 Base64 intrinsic, across LTS and current feature releases — verify against your vendor's advisory (Oracle JDK, Amazon Corretto, Azul Zulu, Eclipse Temurin, Red Hat, Microsoft Build of OpenJDK all inherit from the same upstream code)

How the vulnerability works

The JVM uses CPU intrinsics — hand-optimized assembly routines — to accelerate common JDK operations. On AVX-512-capable hardware, the HotSpot JIT selects a vectorized intrinsic for Base64 decoding. Calif's researchers found that this intrinsic mishandles certain malformed input: specifically, decoding input that violates length/character constraints causes the vectorized routine to miscalculate a bounds condition, producing an out-of-bounds write into adjacent heap memory.

From the attacker's side, the kill chain is straightforward:

  1. Delivery — The attacker submits malformed Base64 to any application endpoint that decodes it server-side: an Authorization: Basic header, a JWT, a file-upload field, a JSON property, a SOAP/SAML body. No authentication is required if the decode happens pre-auth (as it does for Basic Auth parsing and JWT signature verification in many frameworks).
  2. Trigger — The application calls Base64.getDecoder().decode(...) (or a library that wraps it, e.g., Apache Commons Codec paths that delegate to java.util.Base64). HotSpot has JIT-compiled the call site to the AVX-512 intrinsic on supported CPUs.
  3. Corruption — The intrinsic writes past the destination buffer. With heap grooming — Java heap layouts are far more deterministic than defenders assume — the attacker overwrites adjacent object metadata or references.
  4. Execution — Corrupted objects are steered toward controlled native execution, escaping the JVM sandbox entirely. The attacker lands code execution as the JVM service account.

The key exploitation requirement is that the JVM must actually take the AVX-512 path. This is both the vulnerability's limiting factor and its most dangerous characteristic: the workloads running on AVX-512 hardware are disproportionately the high-value, internet-facing, high-throughput services.

Exploitation status

At the time of disclosure, the vulnerability is a publicly documented critical flaw with working researcher proof-of-concept. Given the ubiquity of Base64 decoding in pre-auth request handling, defenders should operate on the assumption that weaponization is a matter of days, not weeks, and that scanning for exposed Java services is already underway. Treat this with the same urgency posture you applied to prior Java-ecosystem events: inventory first, patch second, hunt third — in parallel, not sequence.

Detection & Response

Post-exploitation is where you have the best detection surface. A successful Java4Shell exploit results in the JVM process doing things JVMs almost never do: spawning shells, writing executables to temp directories, or making unexpected outbound connections. These are high-fidelity behaviors.

Sigma Rules

YAML
---
title: Java JVM Process Spawning Shell or Script Interpreter
description: Detects a Java process (java.exe, javaw.exe) spawning a shell or script interpreter — a classic post-exploitation indicator following JVM remote code execution such as CVE-2026-114938 (Java4Shell).
references:
  - https://www.sentinelone.com/blog/java4shell-vulnerability-in-openjdk-enables-rce-on-avx-512-cpus/
  - https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/11/17
status: experimental
tags:
  - attack.execution
  - attack.t1059
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|endswith:
      - '\java.exe'
      - '\javaw.exe'
      - '\javaservice.exe'
  selection_child:
    Image|endswith:
      - '\cmd.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\wscript.exe'
      - '\cscript.exe'
      - '\mshta.exe'
      - '\rundll32.exe'
      - '\regsvr32.exe'
      - '\certutil.exe'
      - '\bitsadmin.exe'
      - '\curl.exe'
      - '\whoami.exe'
      - '\net.exe'
      - '\nltest.exe'
  condition: selection_parent and selection_child
falsepositives:
  - Build servers and CI agents (Jenkins, TeamCity) where Java legitimately invokes scripts — filter by parent command line and known agent paths
level: high
---
title: Java Process Spawning Shell on Linux
description: Detects the java binary spawning a shell, interpreter, or download utility on Linux — a high-fidelity post-exploitation behavior following JVM RCE such as CVE-2026-114938 (Java4Shell).
references:
  - https://www.sentinelone.com/blog/java4shell-vulnerability-in-openjdk-enables-rce-on-avx-512-cpus/
  - https://attack.mitre.org/techniques/T1059/006/
author: Security Arsenal
date: 2026/11/17
status: experimental
tags:
  - attack.execution
  - attack.t1059.006
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/java'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/python'
      - '/python3'
      - '/perl'
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
      - '/id'
      - '/whoami'
  condition: selection_parent and selection_child
falsepositives:
  - Application servers with legitimate process execution (rare — validate against baseline); CI/CD agents running on the host
level: high
---
title: JVM Crash Indicative of Base64 Intrinsic Memory Corruption Attempt
description: Detects JVM fatal error logs or crash events consistent with failed exploitation attempts against the AVX-512 Base64 intrinsic (CVE-2026-114938). Repeated crashes on a single host may indicate active exploitation probing.
references:
  - https://www.sentinelone.com/blog/java4shell-vulnerability-in-openjdk-enables-rce-on-avx-512-cpus/
author: Security Arsenal
date: 2026/11/17
status: experimental
tags:
  - attack.initial_access
  - attack.t1190
logsource:
  category: file_event
  product: linux
detection:
  selection:
    TargetFilename|contains:
      - 'hs_err_pid'
    TargetFilename|endswith:
      - '.log'
falsepositives:
  - JVM crashes from unrelated bugs or resource exhaustion — correlate frequency and source process before escalating
level: medium

The first two rules are your bread and butter — a JVM spawning cmd.exe, bash, or curl is never normal in production application tiers. The third rule catches the failed exploitation attempts: malformed-input memory corruption frequently crashes the JVM before an attacker dials in their heap grooming, and HotSpot writes hs_err_pid<PID>.log files on fatal crashes. A burst of those on one host is a strong probing signal.

KQL (Microsoft Sentinel / Defender)

KQL — Microsoft Sentinel / Defender
// Hunt: Java JVM processes spawning shells, interpreters, or recon utilities
// Post-exploitation indicator for CVE-2026-114938 (Java4Shell)
let lookback = 14d;
let javaParents = dynamic(["java.exe", "javaw.exe", "java", "javaservice.exe"]);
let suspiciousChildren = dynamic([
    "cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe",
    "mshta.exe", "rundll32.exe", "certutil.exe", "bitsadmin.exe", "curl.exe",
    "whoami.exe", "net.exe", "nltest.exe", "sh", "bash", "dash", "zsh",
    "python", "python3", "perl", "curl", "wget", "nc", "ncat", "id", "whoami"
]);
DeviceProcessEvents
| where Timestamp > ago(lookback)
| where InitiatingProcessFileName in~ (javaParents)
| where FileName in~ (suspiciousChildren)
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine,
          FileName, ProcessCommandLine, AccountName, InitiatingProcessId, ProcessId
| order by Timestamp desc;
KQL — Microsoft Sentinel / Defender
// Hunt: Unexpected outbound connections FROM JVM processes to rare external destinations
// Successful Java4Shell exploitation often results in C2 or payload-staging connections
let lookback = 7d;
DeviceNetworkEvents
| where Timestamp > ago(lookback)
| where InitiatingProcessFileName in~ ("java.exe", "javaw.exe", "java")
| where RemoteIPType == "Public"
| summarize ConnectionCount = count(),
            FirstSeen = min(Timestamp),
            LastSeen = max(Timestamp),
            Ports = make_set(RemotePort)
    by DeviceName, InitiatingProcessCommandLine, RemoteIP, RemoteUrl
| where ConnectionCount < 50   // rare/low-volume destinations — tune to your baseline
| order by FirstSeen asc;

For Linux estates ingested via Syslog/CEF, pivot the first query against CommonSecurityLog or Syslog (auditd execve) with the same parent/child logic. Also consider hunting your WAF/load-balancer logs for requests with abnormally large or malformed Authorization headers and JWT tokens — pre-auth decode points are the most likely exploit delivery surface.

Velociraptor VQL

VQL — Velociraptor
-- Hunt for JVM processes with suspicious child processes or AVX-related flags
-- Relevant to post-exploitation triage for CVE-2026-114938 (Java4Shell)

SELECT Pid,
       Ppid,
       Name,
       Exe,
       CommandLine,
       Username,
       CreateTime
FROM pslist()
WHERE Name =~ '(?i)java|javaw'
   OR CommandLine =~ '(?i)java'
VQL — Velociraptor
-- Correlate JVM PIDs against their child processes to surface shells/interpreters
LET jvms = SELECT Pid, Name, CommandLine, Username, CreateTime
           FROM pslist()
           WHERE Name =~ '(?i)^java(\.exe)?$|javaw'

SELECT jvms.Pid AS JVMPid,
       jvms.CommandLine AS JVMCommandLine,
       jvms.Username AS JVMUser,
       p.Pid AS ChildPid,
       p.Name AS ChildName,
       p.Exe AS ChildExe,
       p.CommandLine AS ChildCommandLine,
       p.CreateTime AS ChildCreateTime
FROM jvms
JOIN (
    SELECT Pid, Ppid, Name, Exe, CommandLine, CreateTime
    FROM pslist()
    WHERE Name =~ '(?i)(cmd|powershell|pwsh|sh|bash|dash|python|perl|curl|wget|nc|ncat|whoami|net)'
) AS p
ON jvms.Pid = p.Ppid

Run the second artifact across your server fleet. In a healthy environment, this should return zero rows. Any hit — especially a JVM running as a service account spawning bash or curl within the last 72 hours — is an IR trigger, not a tuning exercise.

Remediation

Step 1 — Inventory (today)

You cannot patch what you haven't found. Enumerate every JVM in the estate, its vendor build, version, and the underlying CPU's AVX-512 capability:

Bash / Shell
#!/usr/bin/env bash
# Java4Shell (CVE-2026-114938) exposure audit — run on each Linux host
# Checks: JVM versions present, running Java processes, AVX-512 CPU capability

echo "=== [1] CPU AVX-512 capability ==="
if grep -qi 'avx512' /proc/cpuinfo; then
    echo "[!] AVX-512 SUPPORTED on this host — vulnerable code path is ACTIVE"
    grep -o 'avx512[a-z0-9]*' /proc/cpuinfo | sort -u | tr '\n' ' '
    echo
else
    echo "[+] No AVX-512 support detected — intrinsic path not reachable"
fi

echo
echo "=== [2] Installed JVMs ==="
for jvm in /usr/lib/jvm/*/bin/java /opt/*/bin/java /usr/java/*/bin/java; do
    [ -x "$jvm" ] && echo "--- $jvm" && "$jvm" -version 2>&1
done

echo
echo "=== [3] Running Java processes ==="
ps -eo pid,user,comm,args | grep -E '[j]ava' | head -50

echo
echo "=== [4] JVM fatal crash logs (possible failed exploitation) ==="
find /var /opt /home /tmp -maxdepth 5 -name 'hs_err_pid*.log' -mtime -14 2>/dev/null

echo
echo "=== [5] Base64 intrinsic flag check on running JVMs ==="
for pid in $(pgrep -x java); do
    if grep -qa 'UseBase64Intrinsics' /proc/$pid/cmdline 2>/dev/null; then
        echo "[PID $pid] Base64 intrinsic flag present:"
        tr '\0' ' ' < /proc/$pid/cmdline; echo
    fi
done

For hardware inventory at scale, your cloud provider's instance-type documentation tells you which families carry AVX-512 (e.g., newer Intel-based compute-optimized and general-purpose families). Don't assume — verify per instance.

Step 2 — Patch

Apply the fixed builds from your JDK vendor as published in their November 2026 security advisories. Every downstream distribution (Oracle, Amazon Corretto, Azul, Eclipse Temurin, Red Hat, Microsoft Build of OpenJDK, SAP Machine) consumes the same upstream fix — pull the current patched release for your major version line from your vendor's advisory and validate with java -version post-upgrade.

Reference: SentinelOne — Java4Shell Vulnerability in OpenJDK

Prioritization order:

  1. Internet-facing Java services on AVX-512 hardware — API gateways, auth services, anything parsing Base64 pre-authentication. Patch within 24–72 hours.
  2. DMZ and partner-facing services — patch within 7 days.
  3. Internal services on AVX-512 hardware — patch within your next maintenance window, no later than 14 days.
  4. Non-AVX-512 hosts — still patch on normal cadence; hardware refresh or live migration can silently move a workload onto a vulnerable code path.

Step 3 — Compensating control (if you cannot patch immediately)

The vulnerable code path is an optional JIT intrinsic. You can disable it — or disable AVX-512 usage entirely — via JVM flags. This forces the decoder onto the safe, non-vectorized path at a modest throughput cost for Base64-heavy workloads:

Bash / Shell
# Workaround A — disable the Base64 intrinsic specifically (preferred, minimal perf impact)
# Add to the JVM launch flags of every Java service (requires diagnostic unlock):
#   -XX:+UnlockDiagnosticVMOptions -XX:-UseBase64Intrinsics

# Workaround B — cap AVX usage below AVX-512 (broader safety, slightly wider perf impact)
#   -XX:UseAVX=2

# Example: applying to a systemd-managed Java service
sudo mkdir -p /etc/systemd/system/myapp.service.d
cat <<'EOF' | sudo tee /etc/systemd/system/myapp.service.d/java4shell-workaround.conf
[Service]
Environment="JAVA_TOOL_OPTIONS=-XX:+UnlockDiagnosticVMOptions -XX:-UseBase64Intrinsics"
EOF

sudo systemctl daemon-reload
sudo systemctl restart myapp.service

# Verify the flag is active
pgrep -x java | while read -r pid; do
    tr '\0' ' ' < /proc/$pid/cmdline; echo
done | grep -c 'UseBase64Intrinsics'

Caveats: JAVA_TOOL_OPTIONS is picked up by most JVM launches, but containers that sanitize the environment and wrapper scripts that override flags may bypass it — verify per service. For containerized workloads, rebuild images with the flag in the entrypoint or update the base image to a patched JDK. This is a stopgap, not a substitute for patching.

Step 4 — Reduce the attack surface

  • WAF/API gateway validation: enforce strict Base64 character-set and length validation on Authorization headers, JWT segments, and known Base64 fields before the request reaches the JVM. Rejecting malformed input upstream removes the trigger condition.
  • Egress filtering: a successfully exploited JVM should have nowhere to go. Restrict outbound traffic from application servers to an explicit allowlist; block JVM-initiated outbound connections to unapproved destinations at the firewall.
  • Least privilege: JVM service accounts should be unprivileged, non-interactive, and unable to write outside application directories. Containerize where possible with read-only root filesystems and seccomp profiles that block unexpected execve behavior — this directly blunts the post-exploitation phase our detections target.

Step 5 — Hunt retrospectively

The vulnerability existed in shipped code before disclosure. Run the VQL artifacts and KQL hunts above across at least the last 30 days. Look specifically for: JVM child-process anomalies, hs_err_pid*.log bursts on AVX-512 hosts, and new outbound destinations from JVM processes. If you find evidence of crashes clustered in time followed by a successful connection, treat it as a confirmed incident and initiate full IR — memory-corruption exploitation frequently fails repeatedly before succeeding.

Conclusion

Java4Shell is a reminder that performance optimizations are attack surface. An intrinsic written to shave microseconds off Base64 decoding created a critical, unauthenticated RCE in one of the most widely deployed runtimes on earth — but only on the newest, highest-value hardware. The defenders who fare best here are the ones who can answer three questions quickly: Where are my JVMs? Which of them sit on AVX-512? And would I notice if one spawned a shell? If you can't answer all three today, that's your action plan.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.