Skip to main content
Vulnerability Database/CVE-2026-111158

CVE-2026-111158: EarthScope libmseed Heap Buffer Overflow

CVE-2026-111158 is a heap out-of-bounds read flaw in EarthScope libmseed that allows attackers to crash processes by supplying truncated miniSEED buffers. This post covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111158 Overview

CVE-2026-111158 is a heap out-of-bounds read vulnerability in EarthScope libmseed through version 3.5.4. The flaw resides in the ms3_detect() function within parseutils.c, which reads past the end of truncated miniSEED 2 record buffers. An attacker can supply a buffer between 40 and 47 bytes that passes the MS2_ISVALIDHEADER check when handed to msr3_parse() or ms3_detect(). The library then over-reads up to 8 bytes beyond the allocation. Successful exploitation can crash the parsing process and leak adjacent heap memory. The vulnerability is tracked as [CWE-125: Out-of-bounds Read].

Critical Impact

A short, maliciously crafted miniSEED 2 buffer passed to libmseed triggers a heap over-read in ms3_detect(), enabling denial of service against seismological processing pipelines.

Affected Products

  • EarthScope libmseed versions up to and including 3.5.4
  • Applications linking libmseed for miniSEED record parsing
  • Downstream seismological data processing tooling that calls msr3_parse() or ms3_detect()

Discovery Timeline

  • 2026-10-15 - CVE-2026-111158 published to the National Vulnerability Database
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-111158

Vulnerability Analysis

The libmseed library parses miniSEED records, a format used for seismological time-series data. The ms3_detect() function inspects an input buffer to identify miniSEED 2 or miniSEED 3 records. For miniSEED 2 records, it reads a blockette offset field from the fixed section data header (FSDH). The function performs the read without validating that the buffer is long enough to contain the complete fixed header. When the buffer is shorter than MS2FSDH_LENGTH (48 bytes) but still passes MS2_ISVALIDHEADER, the macro pMS2FSDH_BLOCKETTEOFFSET dereferences memory beyond the end of the allocation. The result is a heap over-read of up to 8 bytes.

Root Cause

The root cause is missing length validation before accessing the blockette offset field in the miniSEED 2 fixed header. The MS2_ISVALIDHEADER macro validates only the first bytes required to identify a miniSEED 2 record. It does not require that the full 48-byte header is present in the caller-provided buffer. The vulnerable call path reads at an offset beyond the first 40 bytes, exceeding buffers in the 40 to 47 byte range.

Attack Vector

Exploitation requires an attacker to influence the contents and length of a buffer passed to msr3_parse() or ms3_detect(). Delivery vectors include crafted miniSEED files, truncated network payloads, or memory-mapped data processed by downstream tooling. Because the attack vector is local and requires user interaction with the malicious input, the primary impact is denial of service against the parsing process. Heap over-reads may also expose adjacent memory in error paths.

c
     if (!MS_ISVALIDYEARDAY (*pMS2FSDH_YEAR (record), *pMS2FSDH_DAY (record)))
       swapflag = 1;
 
-    blkt_offset = HO2u (*pMS2FSDH_BLOCKETTEOFFSET (record), swapflag);
+    /* Blockette offset is only present in a complete fixed header */
+    blkt_offset =
+        (recbuflen >= MS2FSDH_LENGTH) ? HO2u (*pMS2FSDH_BLOCKETTEOFFSET (record), swapflag) : 0;
 
     /* Loop through blockettes as long as number is non-zero and the 4-byte
      * blockette header (type and next offset) is fully within the buffer */

Source: GitHub Commit c93a36a. The patch guards the blockette offset read with a length check against MS2FSDH_LENGTH, returning a zero offset when the buffer is too short.

Detection Methods for CVE-2026-111158

Indicators of Compromise

  • Process crashes or AddressSanitizer reports in applications linking libmseed versions at or below 3.5.4
  • miniSEED input files or network records of 40 to 47 bytes that pass the MS2_ISVALIDHEADER validity check
  • Unexpected termination of seismological ingest pipelines when processing attacker-supplied data

Detection Strategies

  • Inventory applications and container images that bundle libmseed and compare against the fixed commit c93a36a
  • Run fuzzing with AddressSanitizer or Valgrind against ms3_detect() and msr3_parse() using short, header-shaped inputs
  • Monitor system logs for repeated segmentation faults or heap corruption diagnostics tied to miniSEED parsers

Monitoring Recommendations

  • Enable crash reporting on hosts running seismological data processors to capture over-read signatures
  • Track inbound miniSEED file sizes and flag records shorter than 48 bytes for review
  • Alert on repeated parser failures from the same source, which may indicate probing against the vulnerable code path

How to Mitigate CVE-2026-111158

Immediate Actions Required

  • Upgrade libmseed to a build containing commit c93a36a1381e944b59b10967342ee1cb94304223 from the EarthScope libmseed repository
  • Rebuild and redeploy any statically linked applications or container images that embed libmseed
  • Restrict processing of miniSEED inputs to trusted sources until patched builds are deployed

Patch Information

EarthScope published the fix in commit c93a36a. The ChangeLog entry dated 2026.287 records: "Avoid reading a miniSEED 2 blockette offset beyond a truncated buffer." The patch adds a recbuflen >= MS2FSDH_LENGTH guard around the blockette offset read in parseutils.c. See the VulnCheck advisory and the HackMD technical analysis for additional detail.

Workarounds

  • Pre-validate buffer length and reject miniSEED inputs shorter than 48 bytes before calling msr3_parse() or ms3_detect()
  • Sandbox parser processes with resource limits and crash recovery to contain denial-of-service impact
  • Apply the upstream patch locally if an official release incorporating the fix is not yet available
bash
# Verify installed libmseed version and rebuild from patched source
git clone https://github.com/EarthScope/libmseed.git
cd libmseed
git checkout c93a36a1381e944b59b10967342ee1cb94304223
make clean && make
sudo make install

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.