---
analysis: A static detection rule for 'java spawning a shell' may be too noisy in
  environments with developers. This hunt adds context by filtering for vulnerable
  versions, identifying rare runtime paths, and correlating with JVM-specific memory
  corruption errors, providing the analyst with a clearer picture of actual compromise.
blind_spots:
- id: incomplete-telemetry
  question: Are Java runtimes bundled inside fat JARs or container images visible?
  requires: Deep package inspection or EDR coverage of container internal filesystems
  risk: Java runtimes packaged within application archives may not appear in the software
    inventory, leading to unpatched and unmonitored exposure.
  stage: java4shell-vulnerability-exposure
- id: base64-payload-visibility
  question: Can we see the specially crafted Base64 input in HTTP requests?
  requires: hb_http_activity with full request body capture
  risk: Without request body logging, we cannot verify the presence of the malicious
    Base64 payload, leaving us dependent on process-level side effects like crashes
    or shells.
  stage: base64-exploitation-traffic
coverage:
- stage: java4shell-vulnerability-exposure
  status: covered
  steps:
  - identify-vulnerable-java
  - rare-java-execution
- blind_spot: base64-payload-visibility
  reason: The hb_http_activity surface does not provide the HTTP request body logging
    required to inspect Base64 payloads for malicious content.
  stage: base64-exploitation-traffic
  status: not_visible
- stage: jvm-process-crash
  status: covered
  steps:
  - jvm-hotspot-crashes
- stage: post-exploitation-java-activity
  status: covered
  steps:
  - java-spawning-shells
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: keep-as-periodic-hunt
  justification: CVE-2026-114938 is a critical unauthenticated RCE vulnerability in
    the JVM. Given the prevalence of Java in enterprise environments, a proactive
    hunt to identify both exposure and potential exploitation is required until patching
    is complete.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An unauthenticated attacker has exploited a memory-corruption vulnerability
  in the JVM HotSpot Base64 decoder to execute code, evidenced by unexpected JVM crashes
  or Java runtimes spawning shells.
labels:
- hunt
- attack.t1190
- execution
- impact
- initial access
name: Java4Shell (CVE-2026-114938) Exploitation and Exposure
parameters:
  affected_versions:
    default:
    - 8u511b33-perf
    - 17.0.21.0.3
    - 21.0.13.0.3
    - 25.0.5.0.3
    - 27.0.1.0.3
    - 21.3.20.0.3
    description: Java and GraalVM versions affected by CVE-2026-114938.
    from:
      kind: article
      observed: '2026-11-17'
      ref: CVE-2026-114938
    type: list[string]
  lookback_days:
    default: '14'
    description: Days of history to examine.
    type: number
  scope_hosts:
    default: []
    description: 'Optional: Specific hosts to focus on. Leave empty to hunt across
      the entire estate.'
    type: list[host]
  shell_binaries:
    default:
    - cmd.exe
    - powershell.exe
    - sh
    - bash
    - zsh
    - python
    - nc
    - netcat
    description: Common shell or interpreter binaries used in post-exploitation.
    type: list[string]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching
    gates:
    - dry-run
    - lint
    - critic
    model: hb_google/gemini-3-flash-preview
rationale: Start by identifying internet-facing servers running Java or GraalVM. The
  hunt then pivots to runtime behavior to identify bundled Java versions that may
  not be tracked in standard software inventories.
references:
- name: 'CISA Alert: Critical Java Vulnerability Requires Immediate Patching'
  url: https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching
- name: "Oracle Security Advisory: Critical Security Patch Update \u2013 November\
    \ 2026"
  url: https://www.oracle.com/security-alerts/cpunov2026.html
related:
- hunt: log4shell-post-exploitation
  reason: Log4Shell also targets Java but via a JNDI mechanism; the follow-on shell
    activity is similar.
  relation: alternative
scenario:
  stages:
  - name: Java4Shell Vulnerability Exposure
    observables:
    - 'Oracle Java SE: 8u511b33-perf'
    - 'Oracle Java SE: 17.0.21.0.3'
    - 'Oracle Java SE: 21.0.13.0.3'
    - 'Oracle Java SE: 25.0.5.0.3'
    - 'Oracle Java SE: 27.0.1.0.3'
    - 'GraalVM for JDK: 17.0.21.0.3'
    - 'GraalVM for JDK: 21.0.13.0.3'
    - CVE-2026-114938
    slug: java4shell-vulnerability-exposure
    tactic: initial-access
    techniques:
    - T1190
  - name: Base64 Exploitation Traffic
    observables:
    - Specially crafted Base64 input in HTTP requests
    - Large Base64 strings targeting JVM HotSpot decoder
    slug: base64-exploitation-traffic
    tactic: initial-access
    techniques:
    - T1190
  - name: JVM Process Crash
    observables:
    - Unexpected JVM crashes
    - Application Error in java.exe
    - 'Faulting module: HotSpot JVM'
    - Memory corruption exception codes
    slug: jvm-process-crash
    tactic: impact
  - name: Post-Exploitation Java Activity
    observables:
    - Suspicious Java processes
    - Rogue runtimes
    - java.exe spawning cmd.exe or /bin/sh
    - Anomalous child processes of Java applications
    slug: post-exploitation-java-activity
    tactic: execution
    techniques:
    - T1190
  summary: Attackers can achieve unauthenticated remote code execution by exploiting
    a memory-corruption vulnerability in the Oracle Java Base64 decoder (CVE-2026-114938).
    Successful exploitation typically triggers a JVM crash followed by the execution
    of rogue runtimes or suspicious child processes under the Java application process.
severity: high
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  endpoint:
    category: endpoint
    name: Endpoint telemetry (hb_ surfaces)
    telemetry:
    - endpoint
  hunter:
    agent: true
    name: Hunt agent
tlp: clear
type: investigation
---


# Java4Shell (CVE-2026-114938) Exploitation and Exposure

This hunt identifies hosts exposed to the Java4Shell (CVE-2026-114938) vulnerability and searches for runtime evidence of exploitation. It scopes the environment using vulnerability findings and software inventory, then uses stack-counting to identify rare or bundled Java runtimes. Finally, it correlates suspicious child processes (shells) and memory-corruption application errors within the HotSpot JVM to identify active exploitation attempts.

## identify-vulnerable-java
<!-- Identify vulnerable Java installations -->
Locate hosts with Java runtimes matching the affected versions named in the advisory.

```sqlite target=endpoint role=scoping params=(affected_versions=affected_versions, scope_hosts=scope_hosts)
~~~yaml
expected: A list of hosts and paths where vulnerable Java runtimes are present. These
  are the primary targets for behavioral analysis.
reads:
- device_hostname
- package_name
- package_version
- install_path
- vendor_name
silence: not_evidence_of_absence
source: hb_software_inventory
verified: dry-run
verified_at: '2026-11-18'
~~~
SELECT device_hostname, package_name, package_version, install_path, vendor_name FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%java%' OR LOWER(package_name) LIKE '%jdk%' OR LOWER(package_name) LIKE '%jre%' OR LOWER(package_name) LIKE '%graalvm%') AND instr(',' || '{{affected_versions}}' || ',', ',' || package_version || ',') > 0 AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0)
```

## rare-java-execution
<!-- Rare Java runtime execution -->
Find rogue or bundled Java runtimes that may be missed by software inventory by stack-counting runtime paths.

```sqlite target=endpoint role=baseline params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: A count of hosts per Java binary path. Rare paths or Java runtimes executing
  from temporary directories or user profiles indicate high risk.
prevalence:
  by: device_hostname
  key:
  - process_path
  rare_below: 4
reads:
- process_path
- device_hostname
- time
- process_name
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-11-18'
~~~
SELECT LOWER(process_path) AS java_path, COUNT(DISTINCT device_hostname) AS hosts, MIN(time) AS first_seen, MAX(time) AS last_seen FROM hb_process_activity WHERE (LOWER(process_name) LIKE '%java%' OR LOWER(process_name) LIKE '%jvm%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY java_path HAVING hosts <= 3 ORDER BY hosts ASC
```

## java-spawning-shells
<!-- Java spawning shells or interpreters -->
Detect post-exploitation activity where a Java process (the web app) spawns a shell.

```sqlite target=endpoint role=detection-candidate params=(shell_binaries=shell_binaries, scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
expected: A Java process spawning a shell. While some developer environments exhibit
  this, it is highly unusual for production web servers and suggests remote code execution.
reads:
- device_hostname
- process_name
- process_cmd_line
- parent_process_name
- parent_process_cmd_line
- user_name
- time
- process_original_file_name
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-11-18'
~~~
SELECT device_hostname, process_name, process_cmd_line, parent_process_name, parent_process_cmd_line, user_name, time FROM hb_process_activity WHERE (LOWER(parent_process_name) LIKE '%java%' OR LOWER(parent_process_name) LIKE '%jvm%') AND (instr(',' || '{{shell_binaries}}' || ',', ',' || LOWER(process_original_file_name) || ',') > 0 OR instr(',' || '{{shell_binaries}}' || ',', ',' || LOWER(REPLACE(process_name, '.exe', '')) || ',') > 0 OR LOWER(process_cmd_line) LIKE '%/bin/sh%' OR LOWER(process_cmd_line) LIKE '%/bin/bash%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## jvm-hotspot-crashes
<!-- JVM HotSpot memory corruption crashes -->
Corroborate exploitation by finding application crashes in the HotSpot JVM that align with the memory corruption nature of Java4Shell.

```sqlite target=endpoint role=enrichment params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
expected: Frequent crashes in java.exe or jvm.dll with exception code c0000005 (Access
  Violation). A cluster of these on a vulnerable host suggests exploitation attempts.
reads:
- device_hostname
- app_name
- module_name
- exception_code
- message
- time
silence: not_evidence_of_absence
source: hb_application_error
verified: dry-run
verified_at: '2026-11-18'
~~~
SELECT device_hostname, app_name, module_name, exception_code, message, time FROM hb_application_error WHERE (LOWER(app_name) LIKE '%java%' OR LOWER(module_name) LIKE '%jvm%' OR LOWER(message) LIKE '%hotspot%') AND (LOWER(exception_code) = 'c0000005' OR LOWER(message) LIKE '%memory%corruption%' OR LOWER(message) LIKE '%segfault%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## triage-exposure-activity
<!-- Triage Java4Shell risk and activity -->
```agent target=hunter
cite: required
context:
- identify-vulnerable-java
- rare-java-execution
- java-spawning-shells
- jvm-hotspot-crashes
max_iterations: 4
objective: Examine the identified Java installations, rare runtimes, shells spawned
  by Java, and HotSpot crashes. Determine if any host shows evidence of CVE-2026-114938
  exploitation (e.g., a vulnerable host with a crash followed by a shell).
success_criteria: A verdict of 'vulnerable', 'suspicious', or 'compromised' per host
  with citations of specific command lines and exception messages.
tools:
- endpoint
```

## route-risk
<!-- Route on risk and verdict -->
if~: "the triage-exposure-activity verdict is 'suspicious' or 'compromised' for at least one host" (confidence: high, judge=hunter)
then: → remediation-review
indeterminate: → remediation-review
unavailable: → remediation-review (blind_spot: incomplete-telemetry)
else: → close-out

## remediation-review
<!-- Remediation and IR review -->
```manual target=analyst
For hosts marked 'compromised' or 'suspicious': Collect the Java binary and memory dump if possible; review network logs for outbound traffic from the Java process. For hosts marked 'vulnerable': Apply relevant Java/GraalVM patches immediately, prioritizing internet-facing systems.
```
→ end

## close-out
<!-- Close out -->
```manual target=analyst
No active exploitation was detected. Record the list of vulnerable hosts and versions for the vulnerability management team to track patching progress.
```
→ end
