HDF5 Out-of-Bounds Read Vulnerability in Array Datatype Handling

Vulnerability

A vulnerability in HDF5 versions 2.0.0 prior to 2.1.0 allows for out-of-bounds read operations triggered by corrupted array datatype metadata. The issue arises when the full size of the datatype, the number of elements, and the element size are inconsistent, leading to misaligned data interpretations. This vulnerability is only present in files that have been maliciously altered, as normal usage does not typically allow for such discrepancies.

Impact

Exploitation of this vulnerability causes out-of-bounds read errors, which can lead to memory corruption or disclosure of sensitive information.

Reproduction

The vulnerability can be reproduced by creating an HDF5 file with a corrupted array datatype that misaligns the full size, element count, and element size. This can be done using the H5Dselect or H5Aint functions to manipulate the datatype attributes. The repository 'hdf5-crashes' contains examples of such corrupted files that trigger the out-of-bounds read when accessed with H5dump or H5repack.

Remediation

Users can upgrade to HDF5 version 2.1.0 or later to address this vulnerability.

Added: Jul 20, 2026, 5:20 PM
Updated: Jul 20, 2026, 5:20 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
3.1
exploitability
5.6
remediation
7.7
relevance
10.0
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.