CVE-2024-29157
Critical · 9.8CVSS
9.8
EPSS
0.9%
Published
May 14, 2024
CISA due date
—
Cloudanix analysis
A flaw in a widely used scientific data library can let attackers crash programs or take over systems simply by supplying a specially made data file.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Heap buffer overflow in H5HG_read allows out-of-bounds write that corrupts the instruction pointer, enabling denial of service or arbitrary code execution.
Why it matters to the business
Applications that process untrusted HDF5 files can crash or be fully compromised, disrupting scientific data workflows and risking data theft or system takeover.
How an attack unfolds
An attacker supplies a specially crafted HDF5 file to any process that calls H5HG_read; the malformed global heap triggers the overflow, corrupting the instruction pointer and allowing shellcode execution or a crash.
How to fix it
Upgrade HDF5 to the latest patched release that resolves the H5HG_read overflow; rebuild and redeploy any dependent applications; apply compensating controls such as file-type sandboxing until patches are applied.
How to confirm the fix worked
Confirm the installed HDF5 version is newer than 1.14.3; run regression tests with known trigger files; monitor for crashes or unexpected instruction-pointer corruption in HDF5 processing paths.
Typical attack path
- Attacker crafts malicious HDF5 file with oversized global heap data
- Victim application or library opens the file and invokes H5HG_read
- Heap overflow occurs, overwriting the instruction pointer
- Attacker gains control of execution flow for code execution or denial of service
How to detect it
Review application logs for segmentation faults or heap-related crashes during HDF5 file ingestion; correlate with file-upload or processing timestamps; inspect core dumps for instruction-pointer corruption patterns in H5HG_read.
What your security team should do
- Immediately inventory all systems using HDF5 <= 1.14.3
- Prioritize patching of internet-facing or multi-tenant data-processing services
- Implement file-type restrictions and sandboxing for untrusted HDF5 input
- Add runtime monitoring for abnormal heap behavior in HDF5 consumers
The record
HDF5 through 1.14.3 contains a heap buffer overflow in H5HG_read, 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