%GoCortexIO Snippets

Cortex XSIAM

Java4Shell (CVE-2026-114938) Hunting Guidance

| 30 minutes to implement | ~2 min read
markdown
> Make sure you're comfortable with the results in your own environment before using this more widely.

# Snippet - Java4Shell (CVE-2026-114938) Hunting Guidance

## Scenario - Cortex XQL queries to audit unmitigated Java runtimes, detect JVM heap-grooming crashes (hs_err_pid), catch Java child-process shell execution, and hunt for the CVE-2026-114938 Base64 tail trigger.

Summary & Severity: Rated 9.2 Critical (CVSS 4.0) by Calif (8.1 under Oracle CVSS 3.1), CVE-2026-114938 is an unauthenticated heap-based buffer overflow in OpenJDK HotSpot's x86-64 assembly Base64 decoder (UseBASE64Intrinsics), which relies on AVX-512 VBMI CPU instructions.

[https://calif.io/java4shell/](https://calif.io/java4shell/)

### Emerging threat, some tweaks to XQL hunting logic may be applied as we learn more.
xql
// Make sure you're comfortable with the results in your own environment before using this more widely.
// Audit Running Java Processes Lacking Mitigation Flags (xdr_data)
// Identifies active java / java.exe processes running without -XX:-UseBASE64Intrinsics or -XX:UseAVX=2 and exposes their full command-line arguments to identify exposed services (e.g., Keycloak, Jenkins, Jira, Confluence, Artifactory).

dataset = xdr_data
| filter event_type = ENUM.PROCESS
    and (action_process_image_name = "java" or action_process_image_name = "java.exe")
    and not (
        action_process_image_command_line contains "UseBASE64Intrinsics"
        or action_process_image_command_line contains "UseAVX=2"
    )
| fields _time, agent_hostname, agent_os_type, action_process_image_path, action_process_image_command_line
| dedup agent_hostname, action_process_image_command_line
xql
// Make sure you're comfortable with the results in your own environment before using this more widely.
// Detect JVM Crash Artifacts from Remote Heap Grooming (xdr_data)
// Hunts for HotSpot fatal error logs (hs_err_pid*.log) written to disk when mistimed remote Heap Feng Shui attempts crash the JVM.

dataset = xdr_data
| filter event_type = ENUM.FILE
    and action_file_path contains "hs_err_pid"
| fields _time, agent_hostname, actor_process_image_name, actor_process_image_command_line, action_file_path
xql
// Make sure you're comfortable with the results in your own environment before using this more widely.
// Hunt for Post-Exploitation Java Child Processes (xdr_data)
// Detects java or java.exe spawning command shells or network transfer utilities following memory corruption RCE.

dataset = xdr_data
| filter event_type = ENUM.PROCESS
    and (actor_process_image_name = "java" or actor_process_image_name = "java.exe")
    and action_process_image_name in (
        "sh", "bash", "dash", "zsh", "cmd.exe", "powershell.exe", "pwsh.exe",
        "curl", "wget", "nc", "ncat", "python", "python3", "perl"
    )
| fields _time, agent_hostname, actor_process_image_path, actor_process_image_command_line, action_process_image_name, action_process_image_command_line
xql
// Make sure you're comfortable with the results in your own environment before using this more widely.
// Hunt for HTTP Base64 PoC Trigger Strings (panw_ngfw_url_raw)
// Searches NGFW URL filtering logs for the 64-'A' + '=' substring (which matches both the 65-byte OpenJDK 21+ trigger and the 129-byte OpenJDK 17 trigger) in URLs or User-Agent headers.

dataset = panw_ngfw_url_raw
| filter url_domain contains "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
    or user_agent contains "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
See all 23 snippets