---
id: "CVE-2026-120756"
kind: "vulnerability"
aliases: ["CVE-2026-120756"]
title: "HDF5: crafted file over-reads heap memory when opened"
severity: "low"
cvss: 1.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "hdf5", "package", "python", "scientific-computing"]
not_affected_if: ["trusted-files-only"]
published_at: "2026-11-03T16:17:22+00:00"
first_seen_at: "2026-11-03T16:21:42+00:00"
updated_at: "2026-11-03T16:24:29+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120756", "first_seen_at": "2026-11-03T16:21:42+00:00"}]
---

# HDF5: crafted file over-reads heap memory when opened

HDF5 through 2.2.0 checks an object header message size before reading its flags and creation index, so a crafted file can make the library read past a heap buffer. An attacker who gets a user or application to open a malicious HDF5 file can crash the process or read limited process memory.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed HDF5 library version against the affected range (`through 2.2.0`).
- Find where the application calls `H5Fopen()` on files that come from outside the organization.

## Timeline

- 2026-11-03T16:21:42+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120756

## From the sources

HDF5 through 2.2.0 contains a heap buffer over-read vulnerability in H5O__chunk_deserialize() in src/H5Ocache.c. When decoding object header messages, the declared message size is checked against the end of the chunk image before the remainder of the message header (flags, and for version 2 object headers, the optional creation index) has been decoded. Because the message body begins after these fields, a message can start up to four bytes further into the chunk than the size check accounts for. A crafted HDF5 file can declare a message size that passes the check but extends past the end of the chunk image, causing the message’s decode callback, for example H5O__mtime_new_decode() in src/H5Omtime.c, to read beyond the heap allocation. The flaw is reachable during H5Fopen() on a crafted file. An attacker who can get a user or application to open a malicious file can cause a denial of service or limited disclosure of process memory.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
