Java HotSpot Fatal Error Log Created
Description
Identifies the creation of a Java HotSpot fatal error log by a Java process. The JVM writes "hs_err_pid*.log" after a fatal error, such as an access violation, segmentation fault, or unrecoverable native-code failure. This may indicate an unsuccessful attempt to exploit a Java memory-corruption vulnerability. In particular, failed Java4Shell (CVE-2026-114938) heap-grooming or corruption attempts may crash the JVM before remote code execution succeeds. This event indicates a JVM crash and possible exploit attempt; it does not by itself establish successful exploitation or remote code execution.
Query · eql
file where host.os.type in ("windows", "linux", "macos") and
event.type == "creation" and
process.name : "java*" and
file.name : "hs_err_pid*.log"
Investigation fields
Pivot points the source recommends for triage.
@timestamphost.idhost.namehost.os.typehost.architectureuser.iduser.nameprocess.entity_idprocess.pidprocess.nameprocess.executableprocess.command_linefile.pathfile.namefile.sizefile.hash.sha256
Implementation guide
This rule requires ECS-compatible file creation events that populate event.type, process.name, and file.name.
It searches data from Elastic Defend, Elastic Endgame, Auditbeat, Auditd Manager, Microsoft Defender XDR, SentinelOne
Cloud Funnel, and CrowdStrike Falcon Data Replicator. Availability of process attribution on file events depends on
the source product and integration configuration.
On Linux, Auditbeat or Auditd Manager must be configured to collect the file-creation syscall that writes the HotSpot
error log and normalize it as an ECS file event. Auditd does not collect every file creation by default. Because the JVM
normally writes hs_err_pid*.log to its working directory, and -XX:ErrorFile can redirect it elsewhere, audit policy
coverage must match the Java service's possible output paths. Broad file-creation auditing can generate significant
event volume.
Known false positives
- JVM defects, incompatible or vulnerable JNI libraries, Java agents, profilers, faulty native modules, hardware problems, and resource exhaustion can legitimately cause HotSpot to terminate and write a fatal error log.
Analyst notes
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating Java HotSpot Fatal Error Log Created
The HotSpot JVM creates an hs_err_pid<PID>.log file when it encounters a fatal error it cannot recover from. The file
typically records the signal or exception, problematic frame, JVM and operating-system versions, command line, loaded
native libraries, thread state, and memory details.
Java4Shell (CVE-2026-114938) is a memory-corruption vulnerability in OpenJDK's hardware-accelerated Base64 decoder. Exploitation requires application-specific heap grooming, and unsuccessful object placement or corruption may crash the JVM. Other attempts to exploit Java, the JVM, JNI, JIT, deserialization, or native libraries may produce the same artifact. The existence of this file is evidence of a JVM crash, not proof that exploitation succeeded.
Possible investigation steps
- Review
file.path,file.name,process.name,process.executable,process.command_line,process.entity_id, and the affected user and host. Extract the PID from the filename and correlate it with process and service telemetry. - Preserve and inspect the complete error log. Record the fatal signal or exception, problematic frame, JVM build, active VM flags, loaded native libraries, current thread, and native stack.
- Determine which Java application crashed and whether it is externally reachable or processes untrusted Base64 data, authentication values, uploads, messages, or network responses.
- For possible Java4Shell activity, verify whether the host uses an affected OpenJDK-derived runtime on x86-64 hardware
with AVX-512 VBMI support. Review requests before the crash for repeated decoder warm-up activity, malformed Base64
tails such as 64
Acharacters followed by=, retries, unusual request streaming, and repeated requests from the same source. - Review application, reverse-proxy, load-balancer, and network telemetry immediately before the crash. A Java client may also be exposed when it decodes attacker-controlled data received from a malicious server.
- Search the host for additional
hs_err_pid*.logfiles. Repeated crashes or a crash pattern shared by several Java servers may indicate exploit rehearsal or repeated heap-grooming attempts. - Hunt for evidence of successful follow-on activity, including Java spawning shells or scripting interpreters, unexpected outbound connections, payload downloads, suspicious file creation, credential access, or persistence.
False positive analysis
- Correlate the error log's problematic frame and loaded native libraries with known JVM, application, Java-agent, JNI, profiler, or driver defects and recent upgrades.
- Check service health and infrastructure telemetry for memory exhaustion, disk problems, hardware instability, or administrative crash testing.
- Treat a reproducible crash caused by a known benign defect as benign only after the error signature, application
version, triggering workflow, and change history all agree. Avoid broad exceptions based only on
java*or thehs_err_pid*.logfilename.
Response and remediation
- Preserve the HotSpot error log, application and proxy logs, process telemetry, relevant request data, and any core dump or minidump before restarting or rebuilding the service.
- If exploitation cannot be ruled out, remove the affected service from public traffic and isolate the host when its operational role permits.
- Upgrade affected Java runtimes. For Java4Shell, follow current vendor guidance; temporary mitigations include
disabling Base64 intrinsics with
-XX:-UseBASE64Intrinsicsor limiting AVX use with-XX:UseAVX=2on x86-64. - Scope peer systems for the same JVM version, crash signature, source infrastructure, and Java follow-on behavior.