CVE-2026-120754 in HDF5info

Summary

by MITRE • 11/03/2026

HDF5 through 2.2.0 contains an uninitialized memory read vulnerability in H5Z__filter_scaleoffset() in src/H5Zscaleoffset.c. The decode path validates reads against the allocated size of the chunk buffer rather than the number of bytes actually read from the file. Because H5D__chunk_lock() deliberately sizes filtered chunk buffers to the larger of the stored and unfiltered chunk sizes and fills only the stored bytes, a truncated chunk passes these bounds checks and is decompressed from the uninitialized remainder of the allocation. Unrelated heap contents are then returned to the caller as dataset data. Because the reads remain within the allocation, the issue is not detected by AddressSanitizer. An attacker who can get a user or application to read a dataset from a crafted HDF5 file can cause disclosure of process memory. This issue exists because of an incomplete fix for CVE-2026-19029.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/03/2026

The vulnerability identified in HDF5 versions up to 2.2.0 represents a critical failure in input validation and buffer management within the H5Z__filter_scaleoffset function located in src/H5Zscaleoffset.c. This flaw specifically affects the decode path of data processing, where the library is responsible for reading and decompressing chunked datasets from HDF5 files. The core technical deficiency lies in a mismatch between how memory bounds are checked and how much data is actually present in the source file. Specifically, the validation logic compares incoming read operations against the total allocated size of the chunk buffer rather than verifying that sufficient bytes were actually retrieved from the underlying file stream. This design oversight creates a scenario where truncated or malformed files can bypass security checks because the code assumes the buffer contains valid data up to its full allocation limit, even when the source file provides fewer bytes than expected.

The operational mechanics of this exploit rely on how HDF5 manages memory for filtered chunks during decompression. The H5D__chunk_lock function intentionally sizes these buffers based on the larger of either the stored compressed size or the uncompressed target size to ensure adequate space is available. However, it only populates the buffer with the actual bytes read from the file. When a crafted HDF5 file contains a truncated chunk that passes the flawed bounds check, the decompression process proceeds using uninitialized memory for any portion of the output that exceeds the number of bytes actually present in the input stream. Consequently, unrelated heap contents are returned to the application as if they were valid dataset data. This behavior effectively transforms an out-of-bounds read into a controlled information disclosure vector because the reads remain within the allocated heap region, thereby evading detection by memory safety tools like AddressSanitizer which typically flag accesses outside of allocation boundaries but not uninitialized usage within them.

The impact of this vulnerability is significant for any application that processes untrusted HDF5 files. An attacker who can induce a user or an automated service to open and read data from a specially crafted malicious file can cause the disclosure of sensitive process memory contents. This could lead to the leakage of cryptographic keys, session tokens, private user data, or other confidential information residing in the application's heap space at the time of execution. The severity is further compounded by the fact that this issue persists as an incomplete fix for CVE-2026-19029, indicating a regression or insufficient remediation strategy in previous updates. This suggests that prior attempts to patch similar memory safety issues may have addressed surface-level symptoms without correcting the fundamental logic error regarding buffer size validation versus actual data length verification.

From a classification perspective, this vulnerability aligns with CWE-457, which describes the use of an uninitialized variable, and CWE-20, indicating improper input validation. In terms of offensive security frameworks such as MITRE ATT&CK, this behavior facilitates Data from Information Repositories through crafted files (T1213) and potentially aids in Initial Access if combined with social engineering tactics to trick users into opening malicious documents. The exploitation vector is primarily local or network-based depending on the application's exposure but requires user interaction or automated processing of external data sources.

Mitigation strategies must focus on correcting the validation logic within the H5Z__filter_scaleoffset function and related decoding routines. Developers should ensure that bounds checks are performed against the actual number of bytes successfully read from the file, not just the allocated buffer size. Implementing strict length verification before decompression is essential to prevent uninitialized memory access. Additionally, applications consuming HDF5 data should employ defense-in-depth measures such as running with restricted privileges and utilizing runtime application self-protection tools that can detect anomalous memory reads even if they stay within allocation boundaries. Upgrading to a patched version of HDF5 where this incomplete fix has been fully resolved is the primary remediation step for end-users, while developers integrating the library should verify their build versions against known vulnerable ranges up to 2.2.0 and apply any available hotfixes that address the root cause of CVE-2026-19029 more comprehensively.

Responsible

HDFG

Reservation

11/02/2026

Disclosure

11/03/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!