CVE-2024-29164
Critical · 9.8CVSS
9.8
EPSS
0.9%
Published
May 14, 2024
CISA due date
—
Cloudanix analysis
A bug in the HDF5 data library can let attackers crash programs or potentially take them over by feeding in specially crafted data files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Stack buffer overflow in H5R__decode_heap corrupts the instruction pointer, enabling denial of service or arbitrary code execution when processing malicious HDF5 data.
Why it matters to the business
Systems using HDF5 for scientific or data-intensive workloads face risk of crashes or full compromise if untrusted files are processed, potentially disrupting research pipelines or analytics services; upgrade to the fixed commit is required across all dependents.
How an attack unfolds
An attacker crafts a specially malformed HDF5 file that triggers the overflow in H5R__decode_heap during heap reference decoding; when a vulnerable application opens the file, the overflow corrupts the instruction pointer, allowing control-flow hijacking for code execution or a crash.
How to fix it
Upgrade hdfgroup/hdf5 to the fixed commit 88429b015e29c59de604b0f552001fb7cb7ed5d0 or later; rebuild and redeploy all dependent applications; avoid processing untrusted HDF5 files until patched.
How to confirm the fix worked
Confirm the installed HDF5 version or commit hash matches or exceeds 88429b015e29c59de604b0f552001fb7cb7ed5d0; recompile applications against the patched library and test file parsing with known-good and boundary-case inputs.
Typical attack path
- Identify target applications that parse HDF5 files from untrusted sources
- Craft malicious HDF5 input that overflows the stack buffer in H5R__decode_heap
- Deliver the file via network, storage, or user upload
- Trigger file processing to corrupt the instruction pointer
- Achieve denial of service or execute attacker-controlled code
How to detect it
Review application logs and crash dumps for segmentation faults or instruction pointer corruption during HDF5 file handling; inspect process traces for unexpected execution after HDF5 parsing routines.
What your security team should do
- Immediately inventory all uses of HDF5 and prioritize upgrade to the fixed commit
- Implement file-type validation and sandboxing for any untrusted HDF5 input
- Monitor for application crashes during HDF5 processing as an interim indicator
- Update dependency scanning tools to flag versions prior to the fixed commit
The record
HDF5 through 1.14.3 contains a stack buffer overflow in H5R__decode_heap, resulting in the corruption of the instruction pointer and causing denial of service or potential code execution.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | hdf5 | 0 | No fix |
| Debian:12 | hdf5 | 0 | No fix |
| Debian:13 | hdf5 | 0 | No fix |
| Debian:13 | hdf5 | 0 | 1.14.5+repack-1 |
| Ubuntu:20.04:LTS | hdf5 | 0 | No fix |
| Ubuntu:22.04:LTS | hdf5 | 0 | No fix |
| Ubuntu:24.04:LTS | hdf5 | 0 | No fix |
| Ubuntu:24.10 | hdf5 | 0 | No fix |
| Ubuntu:25.04 | hdf5 | 0 | No fix |
| Ubuntu:25.10 | hdf5 | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | hdf5 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | hdf5 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | hdf5 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | hdf5 | 0 | No fix |
Related vulnerabilities
- CVE-2024-32608 [Unknown description] Also affects hdf5
- CVE-2024-33876 HDF5 Library through 1.14.3 has a heap buffer overflow in H5S__point_deserialize in… Also affects hdf5
- CVE-2024-33875 HDF5 Library through 1.14.3 has a heap-based buffer overflow in H5O__layout_encode in… Also affects hdf5
- CVE-2024-33877 HDF5 Library through 1.14.3 has a heap-based buffer overflow in H5T__conv_struct_opt in… Also affects hdf5
- CVE-2024-33873 HDF5 Library through 1.14.3 has a heap-based buffer overflow in H5D__scatter_mem in… Also affects hdf5
- CVE-2024-33874 HDF5 Library through 1.14.3 has a heap buffer overflow in H5O__mtime_new_encode in… Also affects hdf5
- CVE-2024-32624 HDF5 Library through 1.14.3 contains a heap-based buffer overflow in H5T__ref_mem_setnull… Also affects hdf5
- CVE-2024-32619 HDF5 Library through 1.14.3 contains a heap-based buffer overflow in H5T_copy_reopen in… Also affects hdf5