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

CVE-2026-19025: HDF5 Denial of Service Vulnerability

CVE-2026-19025 is a denial of service vulnerability in HDF5 that allows attackers to crash applications via crafted files. This article covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2026-19025 Overview

CVE-2026-19025 is a denial-of-service vulnerability in the HDF5 library through version 2.3.0. The flaw resides in H5O__layout_decode within H5Olayout.c. HDF5 fails to validate that a chunked dataset's stored chunk-layout dimensionality matches its dataspace rank when an existing dataset is opened. This validation is performed only at dataset-creation time, leaving the open path unchecked.

Attackers craft an HDF5 file with mismatched chunk and dataspace ranks. When a victim opens and reads the file through H5Dopen2 and H5Dread, the library triggers a divide-by-zero in H5S__hyper_iter_get_seq_list in src/H5Shyper.c and crashes. Tools such as h5repack are affected.

Critical Impact

A crafted HDF5 file crashes any application or utility that opens it, disrupting data pipelines and scientific workflows that rely on the library.

Affected Products

  • HDF5 library through 2.3.0
  • h5repack and other HDF5 command-line tools
  • Applications linking libhdf5 that open untrusted HDF5 files

Discovery Timeline

  • 2026-08-05 - CVE-2026-19025 published to NVD
  • 2026-08-05 - Last updated in NVD database

Technical Details for CVE-2026-19025

Vulnerability Analysis

HDF5 stores chunked datasets with a chunk-layout descriptor that records dimensionality. The dataspace itself records a separate rank. During dataset creation, HDF5 enforces that these two values agree. On the open path, H5O__layout_decode deserializes the layout from the object header without re-checking against the dataspace rank.

When the ranks disagree, downstream chunk iteration logic in H5S__hyper_iter_get_seq_list computes a divisor from a dimension that resolves to zero. The resulting divide-by-zero terminates the process. The bug is a classic missing input-validation defect on a trust boundary between the file format and the parser [CWE-369].

Root Cause

The root cause is asymmetric validation between the dataset-creation and dataset-open code paths. H5O__layout_decode trusts the on-disk chunk-layout dimensionality and does not reconcile it with the dataspace rank recorded elsewhere in the file. Any file that bypasses the creation path, including one produced by a malicious tool, propagates inconsistent metadata into the runtime.

Attack Vector

An attacker constructs an HDF5 file whose stored chunk-layout rank differs from the dataspace rank. The attacker delivers the file to a victim through email, shared storage, dataset repositories, or research collaboration platforms. When the victim invokes any workflow that calls H5Dopen2 followed by H5Dread, the library crashes.

Exploitation requires local file access and user interaction to open the file. The impact is limited to availability; confidentiality and integrity are not affected. Automated batch tools such as h5repack amplify the impact by crashing on any file in a processing queue that contains the malformed layout.

No public proof-of-concept code is required beyond a hand-crafted HDF5 file. See the GitHub Issue Discussion for reproduction details.

Detection Methods for CVE-2026-19025

Indicators of Compromise

  • Repeated crashes of h5repack, h5dump, or custom HDF5 consumers on specific input files
  • Core dumps referencing H5S__hyper_iter_get_seq_list or H5Olayout.c
  • Signal SIGFPE (floating-point exception) raised by processes linking libhdf5
  • Untrusted .h5, .hdf5, or .he5 files sourced from external collaborators or public datasets

Detection Strategies

  • Scan HDF5 files with a validator that parses the object header and compares stored chunk-layout dimensionality with the dataspace rank before allowing downstream processing.
  • Monitor process telemetry for abnormal termination of scientific computing utilities that link libhdf5.
  • Correlate SIGFPE crash events with the file paths passed to affected tools to attribute crashes to a specific artifact.

Monitoring Recommendations

  • Log invocations of h5repack, h5dump, and similar tools along with their input file hashes to enable retroactive triage.
  • Alert when the same HDF5 file causes multiple processes to crash within a short window, indicating a poisoned artifact.
  • Track ingestion pipelines that consume HDF5 files from external sources and flag files that fail structural validation.

How to Mitigate CVE-2026-19025

Immediate Actions Required

  • Inventory hosts and containers that ship libhdf5 at version 2.3.0 or earlier, including scientific analysis workstations and batch clusters.
  • Restrict processing of HDF5 files sourced from untrusted parties until a fixed release is deployed.
  • Isolate HDF5 parsing workloads in sandboxed processes so that a crash does not disrupt larger analytical pipelines.

Patch Information

A fixed release addressing the missing rank validation is tracked upstream. Follow the GitHub Issue Discussion for the fix commit and the first release that includes it. Rebuild any application that statically links libhdf5 once the patched library is available.

Workarounds

  • Pre-validate incoming HDF5 files with a wrapper that verifies chunk-layout dimensionality equals dataspace rank before invoking H5Dopen2.
  • Run h5repack and other HDF5 utilities under a supervisor that catches SIGFPE, quarantines the offending file, and continues processing.
  • Restrict file paths accepted by automated pipelines to trusted directories and reject files delivered by external users without prior scanning.
bash
# Configuration example: quarantine files that crash h5repack
for f in /data/incoming/*.h5; do
  if ! timeout 30s h5repack "$f" /tmp/out.h5 2>/dev/null; then
    mv "$f" /data/quarantine/
    logger -t hdf5-guard "Quarantined suspect HDF5 file: $f"
  fi
done

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

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.