---
id: "CVE-2026-120754"
kind: "vulnerability"
aliases: ["CVE-2026-120754"]
title: "HDF5: scale-offset decoder returns uninitialized heap memory from crafted files"
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: ["no-scaleoffset-filter", "trusted-input-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:30+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120754", "first_seen_at": "2026-11-03T16:21:42+00:00"}]
---

# HDF5: scale-offset decoder returns uninitialized heap memory from crafted files

A truncated chunk in a crafted HDF5 file makes the scale-offset filter decompress bytes from an uninitialized buffer, so the reader gets unrelated heap contents as dataset data. An attacker who gets a program to read a malicious HDF5 file can leak process memory.

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

## How to check

- Check the HDF5 library version in use, for example with `h5dump --version` or the installed package version, and compare it against the fixed release.
- Look for applications that open HDF5 files from untrusted sources and read datasets that use the scale-offset filter.

## Timeline

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

## From the sources

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.

---

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