CVE-2026-17573 Overview
CVE-2026-17573 is a double free vulnerability [CWE-415] in the Hierarchical Data Format 5 (HDF5) library. The flaw resides in the h5repack utility and triggers when the tool processes a crafted HDF5 file that contains an oversized chunk size field. Processing such a file causes the same memory region to be freed twice, aborting the application.
The HDF5 library is widely used across scientific computing, machine learning, and data-analysis pipelines. Exploitation requires local access and user interaction to open a malicious file.
Critical Impact
Attackers who can convince a user to run h5repack on a malicious HDF5 file cause a process abort, resulting in denial of service for the affected workflow.
Affected Products
- HDF5 library (The HDF Group)
- h5repack command-line utility bundled with HDF5
- Applications and pipelines that invoke h5repack on untrusted HDF5 files
Discovery Timeline
- 2026-07-27 - CVE-2026-17573 published to the National Vulnerability Database (NVD)
- 2026-07-30 - Last updated in NVD database
Technical Details for CVE-2026-17573
Vulnerability Analysis
The vulnerability is a double free condition [CWE-415] in the HDF5 library's chunk-handling code path exercised by h5repack. When h5repack parses an HDF5 file, it reads the dataset chunk size field from the file metadata. A crafted file supplies an oversized chunk size that fails downstream validation or allocation.
During the resulting error-handling path, a heap buffer associated with the chunk is released. A subsequent cleanup routine releases the same pointer again. The second free() call on the already-released region causes the C runtime to abort the process.
The issue is confined to local file processing. There is no network attack surface, and the impact is limited to availability of the h5repack workflow. See the GitHub Issue Discussion for reproduction details and library maintainer analysis.
Root Cause
The root cause is unsynchronized ownership of a chunk-related heap allocation across error paths in HDF5. Both the primary parsing routine and a cleanup routine assume responsibility for freeing the same pointer when an oversized chunk size triggers the error branch. The pointer is not set to NULL after the first free(), so the second free operates on a dangling pointer.
Attack Vector
Exploitation requires an attacker to deliver a malicious .h5 file to a target and induce the victim to run h5repack against it. This can occur in shared research environments, automated ingestion pipelines that repack untrusted datasets, or CI systems that process user-submitted HDF5 files.
The vulnerability does not yield code execution based on public analysis. The consequence is a reliable process abort, which disrupts batch jobs, data pipelines, or interactive tooling that depends on h5repack.
No public proof-of-concept exploit is currently listed. Technical reproduction details are available in the GitHub Issue Discussion.
Detection Methods for CVE-2026-17573
Indicators of Compromise
- Repeated abnormal terminations of h5repack with double free or free(): double free detected messages in stderr or system logs
- Core dumps generated by h5repack processes shortly after opening an externally sourced HDF5 file
- HDF5 files whose dataset headers advertise implausibly large chunk sizes relative to dataset dimensions
Detection Strategies
- Monitor process exit codes from h5repack invocations in data-processing pipelines and alert on SIGABRT terminations
- Inspect HDF5 file headers before ingestion using h5dump -pH and reject files whose chunk sizes exceed expected bounds
- Enable glibc malloc diagnostics (MALLOC_CHECK_=3) in test environments to surface double free events deterministically
Monitoring Recommendations
- Log every invocation of HDF5 command-line tools, including the source path of the input file and the invoking user
- Correlate h5repack crashes with recent file uploads or transfers to identify potential malicious inputs
- Track HDF5 library versions across build environments and container images to confirm patch coverage
How to Mitigate CVE-2026-17573
Immediate Actions Required
- Restrict h5repack execution to HDF5 files that originate from trusted sources until a patched library version is deployed
- Sandbox HDF5 processing jobs in containers or restricted user accounts to contain aborts and any secondary effects
- Add pre-flight validation that rejects HDF5 files whose chunk size fields exceed the dataset dimensions
Patch Information
At publication, the issue is tracked upstream in the HDF Group GitHub repository. Consult the HDF Group release notes for the fixed library version and rebuild any downstream tools statically linked against HDF5.
Workarounds
- Avoid running h5repack on untrusted files; use h5dump -pH first to inspect chunk metadata
- Wrap h5repack invocations in a supervisor that treats SIGABRT as a pipeline failure and quarantines the input file
- Run HDF5 tooling under a dedicated low-privilege user with resource limits enforced via ulimit or systemd unit constraints
# Configuration example: validate HDF5 chunk metadata before repacking
set -euo pipefail
INPUT="$1"
# Reject files that h5dump cannot parse or that advertise oversized chunks
if ! h5dump -pH "$INPUT" > /tmp/h5meta.txt 2>&1; then
echo "Invalid HDF5 file: $INPUT" >&2
exit 1
fi
# Simple guard: fail if any chunk dimension exceeds 1e8 elements
if awk '/CHUNKED/{f=1} f && /\(.*\)/{gsub(/[(),]/," "); for(i=1;i<=NF;i++) if ($i+0 > 100000000) exit 2}' /tmp/h5meta.txt; then
timeout 60s h5repack "$INPUT" "${INPUT%.h5}.repacked.h5"
else
echo "Suspicious chunk size in $INPUT — refusing to repack" >&2
exit 1
fi
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

