Tag: technology

Detecting Java4Shell: 4 Sigma rules for trigger-shaped headers and JVM crashes

Detecting Java4Shell: 4 Sigma rules for trigger-shaped headers and JVM crashes

Java4Shell is an awkward bug to detect. There are no IOCs, no exploit in the wild as of November 18, 2026, and the vulnerable code is not in any application you could put a WAF signature in front of: it is hand-written assembly inside the JVM’s JIT compiler. It is reached when attacker input goes to the java.util.Base64 basic or URL decoder after C2 has compiled it, on a CPU with AVX-512 VBMI. The patch is the answer. Detection is what tells you whether someone got there first, or is trying to knock your SSO server over while you wait for a maintenance window.

If you want the bug first, read my analysis of Java4Shell (CVE-2026-114938). This post is the detection side: four behaviour-based Sigma rules, the telemetry each one needs, tuning, safe tests, a correlation for “decode errors, then a crash”, corrected inventory and crash-log commands, and a plain list of what none of it can see.

At a glance

  • Rules: 4 (one high, three medium). No IOC rules, because no IOCs have been published.
  • Domains: Web/App (two header rules and one JVM output rule) and Cross-Platform (crash-log file creation on Windows and Linux).
  • Log sources you need: a WAF, reverse proxy or API gateway that can inspect the Authorization header (not logged by default, and for good reason), file creation events on Java hosts (Sysmon EID 11 or an EDR), and the stdout of Java services (journald, container and pod logs).
  • ATT&CK: T1190 Exploit Public-Facing Application, T1499.004 Endpoint Denial of Service: Application or System Exploitation.
  • Status: three rules are test because the behaviour they match is confirmed by Calif, VulnCheck or Oracle’s documentation; the JWT rule is experimental because it rests on reasoning, not observed traffic.
  • YAML: Detection Rules repo on GitHub (Web-App and Cross-Platform folders).

The case in brief

On x86-64 CPUs with AVX-512 VBMI, HotSpot’s C2 compiler replaces hot java.util.Base64 decode calls with a vectorised routine. Calif found that this routine miscounts = padding: the remaining-length counter drops below zero, the store mask becomes “all lanes”, and 62 bytes land past the end of the output array. The decoder then throws an ordinary IllegalArgumentException (in OpenJDK’s source, the message is “Input byte array has wrong 4-byte ending unit”), so the application sees bad input while its heap is already damaged.

Three facts matter for detection. Warming the decoder with valid input looks like normal traffic. The trigger is Base64 ending in padding just past a 64-character block, an impossible length for valid Base64. And short of a finished chain, the outcome is a crash: VulnCheck says a burst of requests reliably brought a service down, and Calif says failed grooming can crash the JVM. Routes include Basic headers, JWTs, body fields, WebSocket frames and a client-side TLS case (Calif, Equixly, HeroDevs). The full chain is in the analysis.

Detection map

Block diagram: WAF or proxy logs, file creation events and Java service output feed four Sigma rules (Basic auth impossible padding, JWT with padding, hs_err_pid log created, fatal error banner) mapped to T1190 and T1499.004, with body, WebSocket and TLS routes and post-exploitation marked as gaps.
Three telemetry sources, four rules. The input is caught at the edge, the crash on the host.

Two rules read the Authorization header for input no honest client sends. Two catch the JVM crashing, once as a file on disk and once as the header it prints to standard output. The red boxes are the gaps: Base64 in bodies, WebSocket frames and the TLS client route never reach a standard log, and SigmaHQ already covers post-exploitation.

Rule overview

RuleDomainLog sourceATT&CK (tactic / technique)LevelStatus
Basic Authorization with impossible Base64 paddingWeb/Appwebserver (WAF, proxy)Initial Access, Impact / T1190, T1499.004Hightest
JWT Bearer token containing paddingWeb/Appwebserver (WAF, proxy)Initial Access, Impact / T1190, T1499.004Mediumexperimental
JVM fatal error log hs_err_pid createdCross-Platformfile_eventImpact, Initial Access / T1499.004, T1190Mediumtest
JVM fatal error banner in application outputWeb/Appjvm / applicationImpact, Initial Access / T1499.004, T1190Mediumtest

Sigma has no standard field for request headers, so the header rules use cs-authorization. Map it to your WAF’s field, or better, run the logic in the WAF and log only the match.

The rules

Basic Authorization with impossible Base64 padding

Context: the HTTP Basic header is the most widely reachable pre-auth route. Equixly says Spring Security decodes it with java.util.Base64 before any password check, and HeroDevs adds Jetty’s BasicAuthenticator and Tomcat’s BasicAuthenticator (9.0.89 and later, 10.1.23 and later) as routes. Equixly suggested flagging invalid padding here. This is the rule I would turn on first.

Condition: alert when a Basic credential has at least 32 Base64 characters, ends in one or two =, and its total length is not a multiple of four. Padded Base64 from any real encoder always is, so this matches only hand-built or corrupted values. The regular expression spells out the four invalid cases (zero, one, two or three characters after the last full block, combined with the wrong amount of padding). I tested it offline against valid encodings of 1 to 79 bytes (no match) and every combination of 28 to 139 characters with one or two =. The 32-character floor follows Equixly’s note that Java 21 and 25 need more than 31 bytes of input to reach the vulnerable path (Java 17 needs more than 128).

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application; Impact (TA0040) – T1499.004 Endpoint Denial of Service: Application or System Exploitation.

title: Java4Shell Trigger Shape - Basic Authorization With Impossible Base64 Padding
id: 9dc30520-911b-44ef-a532-16ff2ef66e47
name: java4shell_basic_auth_impossible_padding
status: test
description: |
Detects HTTP Basic Authorization values of 32 or more Base64 characters that end in '=' padding but whose
total length is not a multiple of four, which no valid encoder produces. This is the input shape that
triggers the CVE-2026-114938 (Java4Shell) heap overflow in the HotSpot AVX-512 Base64 decode intrinsic.
references:
- https://calif.io/java4shell/
- https://equixly.com/blog/2026/11/17/cve-2026-114938-pre-auth-heap-overflow-in-java-17-21-and-25/
- https://www.vulncheck.com/blog/java4shell
- https://netsec101.com/?p=326
author: netsec101.com
date: 2026-11-18
tags:
- attack.initial-access
- attack.impact
- attack.t1190
- attack.t1499.004
- cve.2026-114938
- detection.emerging-threats
logsource:
category: webserver
definition: 'Requirement: a WAF, reverse proxy or API gateway that can inspect the Authorization request header, mapped to the field cs-authorization. Access logs do not record this header by default, and storing Basic credentials in a SIEM is a risk in itself: prefer running this logic inside the WAF and logging only the verdict.'
detection:
selection_impossible_padding:
cs-authorization|re: '^[Bb][Aa][Ss][Ii][Cc] +(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]?={1,2}|[A-Za-z0-9+/]{2}=|[A-Za-z0-9+/]{3}==)$'
selection_min_length:
cs-authorization|re: '^[Bb][Aa][Ss][Ii][Cc] +[A-Za-z0-9+/]{32}'
condition: all of selection_*
falsepositives:
- Vulnerability scanners and fuzzers that send malformed Basic credentials
- Broken clients that truncate or hand-build the header (rare; baseline first)
level: high

View on GitHub

False positives and tuning: exclude authorised scanners by source address, and baseline a week in alert-only mode. The bigger issue is privacy: a Basic header is a username and password in Base64, so do not start shipping it to your SIEM. Most WAFs can run a regex on a header and log only the rule ID; if yours cannot, a length check plus “ends with =” gets most of the value.

How to test: in a test index, write a synthetic WAF log line whose header is a valid Basic value with 32 or more data characters before its == padding, with one = deleted. That value has an impossible length and should match; the unedited value should not. Do not send trigger-shaped input to a real JVM, even in staging, unless it is a box you are happy to crash.

JWT Bearer token containing Base64 padding

Context: libraries that decode JWT segments with Base64.getUrlDecoder(), such as Auth0 java-jwt, reach the flawed decoder (Equixly, HeroDevs). Jackson, Commons Codec, JJWT and Nimbus use their own decoders and do not. Equixly points out that JWT segments are encoded without padding, so a JWT containing = is malformed by definition, and the trigger needs a padding character.

Condition: alert when the Authorization header holds a Bearer token shaped like a JWT (three dot-separated base64url segments, the first starting with eyJ, which is how a JSON header starting with a brace encodes) and the value contains an =. This one is experimental: the logic is sound, but nobody has shown which product’s JWT route is exploitable this way.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application; Impact (TA0040) – T1499.004 Endpoint Denial of Service: Application or System Exploitation.

title: Java4Shell Trigger Shape - JWT Bearer Token Containing Base64 Padding
id: a176c9f0-eb2f-4c07-a9c0-aa016d23a82e
name: java4shell_jwt_bearer_with_padding
status: experimental
description: |
Detects Bearer tokens shaped like a JWT (three dot-separated base64url segments starting with eyJ) that
contain an '=' character. JWT segments are encoded without padding, and the CVE-2026-114938 (Java4Shell)
trigger needs a padding character, so padding inside a JWT may be an attempt to reach the flawed decoder.
references:
- https://equixly.com/blog/2026/11/17/cve-2026-114938-pre-auth-heap-overflow-in-java-17-21-and-25/
- https://www.herodevs.com/blog-posts/java4shell-cve-2026-114938-spring-boot-tomcat-jetty
- https://calif.io/java4shell/
- https://netsec101.com/?p=326
author: netsec101.com
date: 2026-11-18
tags:
- attack.initial-access
- attack.impact
- attack.t1190
- attack.t1499.004
- cve.2026-114938
- detection.emerging-threats
logsource:
category: webserver
definition: 'Requirement: a WAF, reverse proxy or API gateway that can inspect the Authorization request header, mapped to the field cs-authorization. Not logged by default; tokens in logs are secrets, so prefer evaluating this in the WAF.'
detection:
selection_jwt_shape:
cs-authorization|re: '^[Bb][Ee][Aa][Rr][Ee][Rr] +eyJ[A-Za-z0-9_=-]+\.[A-Za-z0-9_=-]+\.[A-Za-z0-9_=-]*$'
selection_padding:
cs-authorization|contains: '='
condition: all of selection_*
falsepositives:
- Non-compliant token issuers or clients that pad base64url segments (verify against your identity provider)
- Security testing and fuzzing of API authentication
level: medium

View on GitHub

False positives and tuning: check your own identity provider and API clients first. A non-compliant issuer that pads its segments would fire on every request, which you will see on day one. JWTs also travel in cookies and query strings; if your applications accept them there, copy the logic to those fields. JWE tokens have five segments and are not matched.

How to test: take a token from a development tenant, add a single = to the end of its payload segment in a synthetic log line, and check that only the edited line matches.

JVM fatal error log hs_err_pid created

Context: when HotSpot crashes it writes a fatal error log named hs_err_pid<pid>.log. Oracle’s troubleshooting guide says it goes to the process working directory, falling back to /tmp on Linux or the TMP/TEMP directory on Windows, unless -XX:ErrorFile moves it. HeroDevs recommends looking for these files since November 17, 2026. Equixly adds that the log will probably not mention Base64, because the corrupted object is usually noticed later, typically by the garbage collector. So the rule does not try to read the content.

Condition: alert when a file whose name is hs_err_pid, a number and .log is created in any directory, on Windows or Linux. There is no product in the log source on purpose, so one rule covers both.

ATT&CK: Impact (TA0040) – T1499.004 Endpoint Denial of Service: Application or System Exploitation; Initial Access (TA0001) – T1190 Exploit Public-Facing Application (a crash can be a failed exploitation attempt).

title: JVM Fatal Error Log hs_err_pid Created
id: 6d8a889e-1a29-4c85-997f-2504dec3eed4
name: jvm_hs_err_pid_crash_log_created
status: test
description: |
Detects creation of a HotSpot fatal error log (hs_err_pid<pid>.log), which the JVM writes when it crashes.
Failed CVE-2026-114938 (Java4Shell) heap grooming and bursts of trigger input crash the JVM, so a new crash
log on an internet-facing Java service running on AVX-512 hardware deserves a look.
references:
- https://calif.io/java4shell/
- https://www.vulncheck.com/blog/java4shell
- https://www.herodevs.com/blog-posts/java4shell-cve-2026-114938-spring-boot-tomcat-jetty
- https://docs.oracle.com/en/java/javase/21/troubleshoot/fatal-error-log.html
- https://netsec101.com/?p=326
author: netsec101.com
date: 2026-11-18
tags:
- attack.impact
- attack.initial-access
- attack.t1499.004
- attack.t1190
- cve.2026-114938
logsource:
category: file_event
definition: 'Requirement: file creation telemetry (Sysmon EID 11 on Windows, Sysmon for Linux EID 11 or an EDR on Linux). Sysmon for Linux file events need an explicit config. Containers: the EDR must see inside the container file system, and the file is lost when the pod restarts.'
detection:
selection:
TargetFilename|re: '[\\/]hs_err_pid[0-9]+\.log$'
condition: selection
falsepositives:
- Ordinary JVM crashes from native code, out-of-memory in native allocations or JDK bugs
- Developers and CI jobs crashing JVMs on build agents (scope to production service hosts)
- Custom -XX:ErrorFile names are not matched; add them if you set one
level: medium

View on GitHub

False positives and tuning: JVMs crash for dull reasons too: native libraries, JDK bugs, bad memory. Scope the rule to production service hosts and drop build agents and developer machines. Then raise the priority where the host is internet-facing and its CPU has AVX-512 VBMI (Ice Lake or newer Xeon, Zen 4 or newer AMD); a crash on a Graviton box is not Java4Shell. If you set a custom -XX:ErrorFile, add that pattern. In Kubernetes the file disappears with the container, which is why the next rule exists.

How to test: with file-event telemetry on, run touch /tmp/hs_err_pid99999.log on Linux or New-Item "$env:TEMP\hs_err_pid99999.log" on Windows, then delete the file.

JVM fatal error banner in application output

Context: the same crash also prints a header to standard output. Oracle’s troubleshooting guide says the header of the fatal error log is also printed to standard output, and its first line is “A fatal error has been detected by the Java Runtime Environment”. In containers, stdout is the one thing almost everyone already collects, and it survives the restart that wipes the hs_err file.

Condition: alert when that sentence appears in the output of a Java service. It is the only header text I match on, because it is the one I could confirm in Oracle’s documentation.

ATT&CK: Impact (TA0040) – T1499.004 Endpoint Denial of Service: Application or System Exploitation; Initial Access (TA0001) – T1190 Exploit Public-Facing Application.

title: JVM Fatal Error Banner In Application Output
id: 988ead27-6a7c-477b-9c70-4d77dcdd6b4a
name: jvm_fatal_error_banner_in_output
status: test
description: |
Detects the HotSpot fatal error header that the JVM prints to standard output when it crashes. It catches
crashes where the hs_err_pid file is lost, such as containers that restart, and is a signal for failed
CVE-2026-114938 (Java4Shell) exploitation or trigger-based denial of service.
references:
- https://docs.oracle.com/en/java/javase/21/troubleshoot/fatal-error-log.html
- https://calif.io/java4shell/
- https://www.vulncheck.com/blog/java4shell
- https://netsec101.com/?p=326
author: netsec101.com
date: 2026-11-18
tags:
- attack.impact
- attack.initial-access
- attack.t1499.004
- attack.t1190
- cve.2026-114938
logsource:
product: jvm
category: application
definition: 'Requirement: the stdout/stderr of Java services collected into the SIEM (systemd journal, container runtime logs, Kubernetes pod logs or the application console log such as catalina.out).'
detection:
keywords:
- 'A fatal error has been detected by the Java Runtime Environment'
condition: keywords
falsepositives:
- Ordinary JVM crashes unrelated to Java4Shell (native libraries, JDK bugs, hardware faults)
level: medium

View on GitHub

False positives and tuning: the same dull crashes as the previous rule, with the same scoping. Two signals sit around it that are worth adding in your SIEM: a container that exits with code 134 (128 plus SIGABRT, which is how a crashing JVM usually ends) and a systemd unit whose main process exited with code=dumped. Both say “this service died hard” without depending on log text.

How to test: print the sentence from a throwaway container or systemd unit whose output you collect, for example echo '# A fatal error has been detected by the Java Runtime Environment:', and check that the rule fires with the right host and service fields.

Correlation: trigger header, then a crash

The pattern I would really alert on is a burst of trigger-shaped input followed by the JVM going down. Most applications swallow the decode exception and return a 400 or 401 without logging it, so the “decode error spike” has to come from the edge rule. Below is a Sigma temporal correlation that joins the Basic header rule and the banner rule on the same backend within 15 minutes. It is an example, not a shipped rule: my validator only handles single rules and I could not run sigma check on it. The alias matters because the proxy’s host field is the virtual host the client asked for, not the machine the JVM runs on, so map backend to an upstream or asset field you actually have.

title: Java4Shell Trigger Header Followed By JVM Crash On The Same Backend
id: 8abecdac-41af-4776-8989-f82a3fa39368
status: experimental
correlation:
type: temporal
rules:
- java4shell_basic_auth_impossible_padding
- jvm_fatal_error_banner_in_output
aliases:
backend:
java4shell_basic_auth_impossible_padding: upstream-host
jvm_fatal_error_banner_in_output: Hostname
group-by:
- backend
timespan: 15m
level: high

The field names upstream-host and Hostname are placeholders: replace them with your own. If you have no edge visibility, a weaker version of the same idea is a spike of 400 or 401 responses from one client address in your access logs, followed by a crash rule firing on that backend.

Retro-hunt and inventory commands, corrected

The draft commands that went around on disclosure day mostly work, with two traps. find / -xdev stays on the root file system, so it misses /var, /opt, /home or /tmp when they are separate mounts, which is common on servers. And java -XX:+PrintFlagsFinal -version starts a fresh JVM from your PATH; it says nothing about the flags of the service that is already running. Here are the versions I would use, on Linux, run inside the container when the JVM lives in one:

# JVM crash logs since October 18, 2026, on all mounted file systems
# (without -xdev this includes network mounts; prune them if that is slow)
find / \( -path /proc -o -path /sys \) -prune -o -type f -name 'hs_err_pid*.log' -newermt '2026-10-18' -print 2>/dev/null
# Was a custom crash-log location set for this JVM?
tr '\0' '\n' < /proc/<PID>/cmdline | grep ErrorFile
# CPU gate: prints 4 when avx512f, avx512bw, avx512vbmi and bmi2 are all present
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -cE '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
# Is the workaround set on the running process?
tr '\0' '\n' < /proc/<PID>/cmdline | grep -E 'UseBASE64Intrinsics|UseAVX'
tr '\0' '\n' < /proc/<PID>/environ | grep JAVA_TOOL_OPTIONS
jcmd <PID> VM.flags | tr ' ' '\n' | grep -E 'UseBASE64Intrinsics|UseAVX'

Why about a month and not just since disclosure? The vulnerable intrinsic shipped in 17.0.6 in January 2023, Wiz says its tooling had an exploit before full disclosure, and you need a baseline of how often your JVMs crash anyway. jcmd must run as the same user as the JVM and ships only with a full JDK. As for the fix: the Oracle builds that Tenable and HeroDevs report (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and 8u513-perf) are still unverified, because Oracle’s own page returned HTTP 403 when I tried it. Confirm the version in your vendor’s release notes before you close a ticket on it.

Coverage and gaps

Step in caseTacticTechniqueRuleCovered?
Trigger via Basic auth headerInitial Access (TA0001)T1190Basic impossible paddingYes, if the header is inspected
Trigger via JWTInitial Access (TA0001)T1190JWT with paddingYes, if the header is inspected
Trigger via body field, WebSocket frame or outbound TLSInitial Access (TA0001)T1190–Gap: not in standard logs
Warming the decoder–––Gap: looks like normal traffic
JVM crash, denial of serviceImpact (TA0040)T1499.004hs_err_pid created, fatal error bannerYes
Memory disclosure to beat ASLR–––Gap: product-specific, unpublished
Code execution and what followsExecution (TA0002)T1059.004SigmaHQ Java child-process rulesPartial, not mine

The biggest blind spot is an exploit that never crashes. If the heap grooming works first time, the only evidence before code execution is the trigger, and only if it came in a header you inspect. After that, Java4Shell looks like any Java web RCE, and SigmaHQ’s “Suspicious Java Children Processes” (Linux, Nasreddine Bencherchali, 2022) and “Shell Process Spawned by Java.EXE” (Windows) already cover a JVM starting shells; expect noise from Jenkins controllers that build on the built-in node. Closing the payload gaps needs body inspection in a WAF or a network sensor. VulnCheck’s Snort and Suricata rules are customer-only, so I cannot judge them.

Deploying the rules

Grab the YAML from the repo and convert it with sigma-cli. I have not run these conversions (sigma-cli is not installed where I built the rules), so treat the commands below as untested starting points. The pipeline has to match the log source, and none of these rules fits a stock pipeline cleanly: the header rules use a field you map yourself, the banner rule is a keyword search, and the crash-log rule has no product, so you may need to add product: windows or product: linux to a copy before an OS-specific pipeline will accept it:

# Untested. Crash log: no pipeline, then map TargetFilename to your file-event field
sigma convert -t splunk --without-pipeline file_event_java_hs_err_pid_crash_log_created.yml
# Untested. Fatal error banner: keyword search over your container or journald index
sigma convert -t splunk --without-pipeline java_jvm_fatal_error_banner_in_output.yml
# Untested. Header rules: map cs-authorization to your WAF field first
sigma convert -t splunk --without-pipeline web_cve_2026_114938_java4shell_basic_auth_impossible_padding.yml

Check the generated regex by hand for your backend, since regex dialects differ between SIEMs and I have not tested any of them with these patterns. If yours rejects the non-capturing groups or the anchors, rewrite the expression in its dialect and test it against a valid and an invalid header. Run everything in alert-only mode for a week, look at what fires, then decide what pages someone.

My take

Java4Shell is more detectable than its name suggests, but only at the two ends. The input has a shape no legitimate client produces, and the most likely outcome of a failed or sloppy attempt is a crash, which every runtime announces loudly. The middle, a careful attacker who warms the decoder and lands the exploit first time, is close to invisible. That makes the crash rules the ones I would deploy today on every Java host, and not only for this CVE: an unexplained JVM crash on an internet-facing identity provider has deserved a ticket for years.

If I could ask one thing of the frameworks, it would be a log line. As far as I can tell, Spring Security, Tomcat and Jetty treat a malformed Basic header as a failed login and answer 401 without logging anything at default levels. One WARN-level event with the source address for “credential header failed to decode” would have turned this bug, and the next parser bug, into a one-line SIEM rule. Until then, put the header check in your WAF, watch for crashes, and patch.

Sources

Java4Shell (CVE-2026-114938): a Base64 JIT bug that needs AVX-512 VBMI hardware

Java4Shell (CVE-2026-114938): a Base64 JIT bug that needs AVX-512 VBMI hardware

Sixty-five characters. That is roughly how long a Base64 string has to be to make a Java server that was fully patched last week write 62 bytes past the end of an array on its own heap. No deserialization gadget, no JNDI lookup, no reflection trick: just a string ending in an equals sign, handed to the most boring API in the JDK on the wrong kind of CPU.

On November 17, 2026, the research firm Calif disclosed CVE-2026-114938, which it calls Java4Shell. It is a memory corruption bug in the hand-written AVX-512 assembly that HotSpot’s C2 compiler uses to speed up java.util.Base64 decoding. Calif says it turned that into pre-authentication remote code execution against default installs of Jira, Confluence, Keycloak, Jenkins, JFrog Artifactory and PingFederate. Oracle and the OpenJDK project shipped fixes the same day.

Severity: critical in my book, because of where Java runs and what Calif demonstrated, even though Oracle rates it 8.1 and real-world RCE is hard. It is a narrower bug than the name suggests, and the hardware gate matters more than most headlines admit. No in-the-wild exploitation was reported as of November 17, and I found nothing newer on November 18.

At a glance

  • CVE: CVE-2026-114938 (“Java4Shell”), heap out-of-bounds write (CWE-787 per Red Hat).
  • CVSS: 9.2 under CVSS 4.0 (Calif); 8.1 under CVSS 3.1, AV:N/AC:H/PR:N/UI:N (Oracle); Red Hat lists a preliminary 9.8.
  • Affected: OpenJDK 17.0.6 and later, plus the 21, 25 and 27 lines, and every distribution built from them (Oracle, Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat). Oracle’s Java 8 Enterprise Performance Pack build is also listed. Standard Java 8 and 11 are not.
  • Hardware gate: only x86-64 CPUs with AVX-512 VBMI (Intel Ice Lake Xeon and newer, AMD Zen 4 and newer, plus Intel’s 2019-2021 Ice Lake, Tiger Lake and Rocket Lake client chips per VulnCheck). ARM64 is not affected.
  • Exploitation: a trigger-only PoC is public. Calif’s product exploit chains are withheld. No in-the-wild exploitation reported as of November 17 (BleepingComputer, Tenable), and I found nothing newer on November 18; not in CISA KEV.
  • Fix: Oracle builds 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and 8u513-perf (as reported by Tenable). Other distributions on their own schedules. Workaround: -XX:-UseBASE64Intrinsics.
  • Who should care: anyone running internet-facing Java services on recent Intel or AMD server hardware, physical or cloud.

What we know

Calif researcher Quang Luong found the bug. According to BleepingComputer, he used OpenAI’s Codex while auditing OpenJDK internals, found the flaw in about an hour, had a first working exploit about two hours later, and spent under $200 in AI usage. Oracle credits Luong and Albert Yang, per Tenable. Red Hat says Calif reported the issue to it ahead of Oracle’s fix.

The OpenJDK advisory and Oracle’s November 2026 Critical Patch Update went out on November 17 at 1:00 pm Pacific, per Calif. BleepingComputer reports the CPU fixes 655 vulnerabilities across Oracle’s portfolio. A sourcing caveat: I could not open Oracle’s CPU page or the OpenJDK advisory (both returned HTTP 403), so the fixed builds below come from Tenable’s and HeroDevs’ reading of Oracle’s documents. They agree, but treat them as unverified until you see them in your vendor’s release notes.

Calif published a root-cause write-up and a standalone trigger program whose overflow stays inside a larger array it owns, so it proves the bug safely. The product-specific chains stay private until users have had time to upgrade. No in-the-wild exploitation was reported as of November 17, and I found nothing newer on November 18.

How it works

An intrinsic is a method the JIT compiler swaps out for hand-tuned machine code. Once a Base64 decode call gets hot enough for C2 to compile it, and the CPU advertises AVX-512 VBMI, HotSpot stops running the Java implementation and runs a vectorised assembly routine instead. This intrinsic (JDK-8268276, per HeroDevs) landed in JDK 18 and reached 17.0.6 in January 2023 (Equixly): nearly four years in production.

The final chunk of input is written with a masked 64-byte vector store: a mask decides which of the 64 byte lanes actually get written. Calif explains that the mask is derived from the remaining output length, and the padding logic decrements that length once for each =, even after it has already reached zero. The counter goes to -1 or -2. The bit-manipulation instruction that builds the mask treats that negative value as “everything”, so all 64 lanes are written. In Calif’s example, 64 valid characters plus one = leave a 50-byte output buffer, the store starts at offset 48, and 62 bytes land past the end.

Two details shape the real risk. First, the attacker controls very little of what gets written: Calif says byte 0 is fully controlled, byte 1 only partly (4 bits), and bytes 2 to 63 are uncontrolled, with bytes 48 to 63 always 0x9a. Second, the decoder then throws IllegalArgumentException as if nothing happened, so the application sees an ordinary “bad input” error while its heap is already damaged.

Five-step diagram of the Java4Shell attack chain: reach a Base64 decode with attacker input, warm the decoder until C2 compiles it, send input ending in a padding character, the AVX-512 masked store overwrites 62 bytes past the array, and heap grooming turns corruption into a crash or code execution.
How Java4Shell goes from a Base64 string to heap corruption. Based on Calif’s write-up, VulnCheck and Equixly.

Getting from there to code execution is the hard part. Per Calif, each target needs a route to the decoder, a useful object right after the array, a way to read memory back, and a heap layout that lines it all up. Grooming is probabilistic, failed attempts can crash the JVM, and remote grooming is sensitive to network latency (Calif rented a VM in the same cloud region as its targets). VulnCheck adds that RCE needs non-trivial heap grooming plus a memory disclosure to get past ASLR.

Which code paths reach it? Equixly and HeroDevs point at everyday inputs: HTTP Basic Authorization headers, which Spring Security decodes before any password check (Equixly) and which HeroDevs lists as a pre-auth route through Jetty’s and Tomcat’s BasicAuthenticator (Tomcat 9.0.89+ and 10.1.23+); JWTs in libraries that call Base64.getUrlDecoder(), such as Auth0 java-jwt; and Base64 fields in request bodies. The MIME decoder and libraries with their own decoders (Jackson, Commons Codec, JJWT, Nimbus) avoid the flawed path. Calif also mentions a client-side exploit, shared by samczsun, that works against a Java program connecting over TLS to a malicious server.

Who is affected and how badly

Three conditions have to hold at the same time, and this is where the exposure gets smaller than “every Java app”.

Diagram of the three gates that must all be open for Java4Shell exposure: an affected JDK build, an x86-64 CPU with AVX-512 VBMI, and an attacker-reachable java.util.Base64 basic or URL decode. Lists what closes each gate.
All three gates must be open. Closing any one of them removes the exposure.

The JDK gate is wide: 17.0.6 through the November 17 builds, and all of 21, 25 and 27. The hardware gate is the interesting one. VulnCheck notes that Intel disabled AVX-512 on client chips from Alder Lake (12th gen) onward, so most developer laptops will not reproduce this, while Ice Lake and Sapphire Rapids Xeons and AMD Zen 4/5 EPYC servers will. ARM hosts such as Graviton and Ampere are out. The blind spot: “it doesn’t reproduce on my laptop” tells you nothing about production.

The reachability gate is where the products come in. Calif’s pre-auth list includes identity providers (Keycloak, PingFederate) and build infrastructure (Jenkins, Artifactory), exactly the boxes you least want an attacker on. Its post-auth list adds Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. Both lists are non-exhaustive.

On the severity gap: Oracle scored attack complexity high, which drags CVSS 3.1 to 8.1. Calif has not published the CVSS 4.0 vector behind its 9.2, so I can’t say which metrics differ. My practical split: denial of service is easy (VulnCheck says a burst of requests reliably brought a service down in its testing), and RCE is expensive. Calif has demonstrated it against real products. Others claim it without public proof: Wiz says its tooling built an exploit within two hours, Kevin Breen of Immersive says he has an application-specific exploit (per Tenable), and VulnCheck sells a full RCE exploit to its customers. None of those exploits is public, and no in-the-wild exploitation was reported as of November 17; I found nothing newer on November 18.

What to do now

  1. Find your exposed JVMs first, not your Java installs. A host is in scope only if the running JDK is affected and the CPU exposes avx512f, avx512bw, avx512vbmi and bmi2. Check inside the container, not on the host.
  2. Patch internet-facing identity and CI systems first: Keycloak, PingFederate, Jenkins, Jira, Confluence, Artifactory. For Oracle JDKs, the fixed builds reported are 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and 8u513-perf. For Temurin, Corretto, Zulu, Microsoft, Red Hat and others, wait for the vendor’s own release that names CVE-2026-114938. As of November 18 I could not confirm those version numbers, and Red Hat says it is still assessing its packages (bulletin RHSB-2026-018).
  3. Check bundled runtimes: container images and vendor installers can carry their own JDK, so rebuild images on patched bases. Upgrading Spring, Tomcat or Jetty does nothing here; only the JDK fix closes it (HeroDevs). Restart or redeploy after patching, because a running JVM keeps the old code.
  4. Where you cannot patch today, add -XX:-UseBASE64Intrinsics to the JVM options. It disables only the vulnerable fast path. VulnCheck’s tested form puts -XX:+UnlockDiagnosticVMOptions in front of it. The blunter -XX:UseAVX=2 also works on x86-64 but slows other vectorised code such as crypto (Equixly), and Calif warns that a JVM on ARM refuses to start with it, so do not roll it out fleet-wide blindly. Neither Oracle nor OpenJDK has endorsed these flags.
  5. Do not lean on your reverse proxy: Calif says nginx request buffering is not a mitigation and does nothing for WebSocket frames. And, as HeroDevs warns, do not run unreviewed GitHub “PoC” repositories or send the trigger to a live service.

A quick inventory pass on a Linux host or inside a container. The CPU flag check is the one Calif publishes; the process and flag checks are my own commands, built on the published CPU flag names and the two workaround flags. Run it inside the workload (for example with kubectl exec), as the same user as the JVM. jcmd ships with a full JDK, so JRE-only images need the /proc lines instead:

# CPU gate: prints 4 when all four flags are present and the vulnerable path can run
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -cE '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
# Which JDK is this running process actually using?
readlink -f /proc/<PID>/exe
"$(readlink -f /proc/<PID>/exe)" -version
jcmd <PID> VM.version
# Is the workaround set on the running process (command line or JAVA_TOOL_OPTIONS)?
tr '\0' '\n' < /proc/<PID>/cmdline | grep -E 'UseBASE64Intrinsics|UseAVX'
tr '\0' '\n' < /proc/<PID>/environ | grep JAVA_TOOL_OPTIONS
jcmd <PID> VM.flags | tr ' ' '\n' | grep -E 'UseBASE64Intrinsics|UseAVX'

One trap: java -XX:+PrintFlagsFinal -version starts a new JVM from whatever java is on your PATH and shows its defaults. It tells you nothing about the flags of a service that is already running.

Detection and monitoring

No IOCs have been published, and VulnCheck’s network and Sigma rules are customer-only, so everything here is behaviour-based. Two parts of the attack can be caught: the input itself, if something in front of the JVM can inspect the Authorization header, and the crashes that failed grooming and trigger bursts cause (Calif, VulnCheck). The middle of the attack, warming the decoder with valid requests, looks exactly like normal traffic.

RuleCategoryLog sourceATT&CKLevel
Basic Authorization with impossible Base64 paddingWeb/AppWAF or proxy (webserver)T1190, T1499.004High
JWT Bearer token containing paddingWeb/AppWAF or proxy (webserver)T1190, T1499.004Medium
JVM fatal error log hs_err_pid createdCross-Platformfile_event (Sysmon, EDR)T1499.004, T1190Medium
JVM fatal error banner in service outputWeb/Appjvm application (stdout, pod logs)T1499.004, T1190Medium

The highest-signal rule is the first one. Correctly padded Base64 always has a length that is a multiple of four, and the trigger Calif describes is a run of valid characters ending in = just past a 64-character block, which no encoder produces. The rule alerts when a Basic credential of at least 32 Base64 characters ends in padding but has an impossible length. Equixly suggested this check. One warning: most access logs do not record the Authorization header, and logging it means storing passwords, so run this logic in your WAF and log only the verdict.

title: Java4Shell Trigger Shape - Basic Authorization With Impossible Base64 Padding
id: 9dc30520-911b-44ef-a532-16ff2ef66e47
name: java4shell_basic_auth_impossible_padding
status: test
description: |
Detects HTTP Basic Authorization values of 32 or more Base64 characters that end in '=' padding but whose
total length is not a multiple of four, which no valid encoder produces. This is the input shape that
triggers the CVE-2026-114938 (Java4Shell) heap overflow in the HotSpot AVX-512 Base64 decode intrinsic.
references:
- https://calif.io/java4shell/
- https://equixly.com/blog/2026/11/17/cve-2026-114938-pre-auth-heap-overflow-in-java-17-21-and-25/
- https://www.vulncheck.com/blog/java4shell
- https://netsec101.com/?p=326
author: netsec101.com
date: 2026-11-18
tags:
- attack.initial-access
- attack.impact
- attack.t1190
- attack.t1499.004
- cve.2026-114938
- detection.emerging-threats
logsource:
category: webserver
definition: 'Requirement: a WAF, reverse proxy or API gateway that can inspect the Authorization request header, mapped to the field cs-authorization. Access logs do not record this header by default, and storing Basic credentials in a SIEM is a risk in itself: prefer running this logic inside the WAF and logging only the verdict.'
detection:
selection_impossible_padding:
cs-authorization|re: '^[Bb][Aa][Ss][Ii][Cc] +(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]?={1,2}|[A-Za-z0-9+/]{2}=|[A-Za-z0-9+/]{3}==)$'
selection_min_length:
cs-authorization|re: '^[Bb][Aa][Ss][Ii][Cc] +[A-Za-z0-9+/]{32}'
condition: all of selection_*
falsepositives:
- Vulnerability scanners and fuzzers that send malformed Basic credentials
- Broken clients that truncate or hand-build the header (rare; baseline first)
level: high

For monitoring, the crash rules matter more than the header rules, because they also cover routes no log can see: Base64 in request bodies, WebSocket frames and the client-side TLS case. Equixly warns the crash log will probably not mention Base64, since the damage is usually noticed later by the garbage collector, so do not filter on it. Treat an unexplained crash of an internet-facing Java service on an AVX-512 host as a possible attempt, and, as HeroDevs advises, rotate the secrets that service held in memory. The JVM writes hs_err_pid<pid>.log to its working directory, or to /tmp if that fails (Oracle’s troubleshooting guide), so retro-hunt every mount, not just the root file system. I would search about a month before disclosure too: the bug sat in production for nearly four years and Wiz says it had an exploit before full disclosure. Keep these rules on after patching, since a JVM keeps the old code until it restarts, and container images rebuilt from old bases bring it back.

# JVM crash logs since October 18, 2026, on all mounted file systems (Linux)
# (this includes network mounts; prune them if the search is slow)
find / \( -path /proc -o -path /sys \) -prune -o -type f -name 'hs_err_pid*.log' -newermt '2026-10-18' -print 2>/dev/null
# Was a custom crash-log location set for this JVM?
tr '\0' '\n' < /proc/<PID>/cmdline | grep ErrorFile

I wrote up all four rules, with tuning notes, a correlation for “decode errors then restart”, ATT&CK coverage and the gaps, in a separate detection post. The YAML lives in my Detection Rules repo.

My take

The “4Shell” branding oversells the ease of exploitation and undersells the bug class. This is not Log4Shell: there is no one-line payload that pops every vulnerable host, the attacker controls about a byte and a half of the overflow, and a working chain needs per-product engineering plus a memory leak. VulnCheck’s skepticism about the hype is fair on that point.

But I would still patch this week, ahead of most of the 655 other items in the CPU, for two reasons. The cheap outcome, crashing your SSO or CI server with a malformed header, needs no grooming at all. And the expensive outcome got a lot cheaper: one researcher with an AI coding assistant found the bug in an hour, and on disclosure day four separate teams (Calif, Wiz, VulnCheck and Immersive’s Kevin Breen) said they had working exploits, although only Calif has shown its work. When the AI bill for finding the bug and a first exploit is under $200, “attack complexity: high” stops being much comfort. The one thing in our favour: no in-the-wild exploitation was reported as of November 17, and I found nothing newer on November 18.

The bigger lesson is about memory safety in a “memory-safe” language. Java developers do not think about bounds checks because the JVM does them, except inside the hand-written assembly the JVM uses to go fast. Because those intrinsics are gated on CPU features, exploitability depends on which instance type the scheduler picked. I expect more bugs like this as AI-assisted auditing reaches JIT intrinsics. First thing I’d do tomorrow: list every internet-facing JVM running on Ice Lake-or-newer Intel or Zen 4-or-newer AMD hardware, and start with the identity providers.

Sources