---
id: "CVE-2026-120758"
kind: "vulnerability"
aliases: ["CVE-2026-120758"]
title: "HDF5: crafted file triggers NULL pointer crash when opened"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "hdf5", "package", "python", "scientific-computing"]
not_affected_if: ["no-hdf5-library-in-use", "trusted-files-only"]
published_at: "2026-11-03T16:17:23+00:00"
first_seen_at: "2026-11-03T16:21:43+00:00"
updated_at: "2026-11-03T16:24:18+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120758", "first_seen_at": "2026-11-03T16:21:43+00:00"}]
---

# HDF5: crafted file triggers NULL pointer crash when opened

A crafted HDF5 file makes the HDF5 library dereference a NULL pointer in H5HL_unprotect() while reading a corrupted local heap. The result is a crash, a denial of service for any program that opens and traverses the file.

_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 version reported by your build; versions through `2.2.0` are affected.
- Find where your applications open HDF5 files from untrusted sources.

## Timeline

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

## From the sources

HDF5 through 2.2.0 contains a NULL pointer dereference vulnerability in H5HL_unprotect() in src/H5HL.c. H5HL_protect() pins a single metadata cache entry for a local heap, either the heap prefix or the separate data block, and H5HL_unprotect() unpins it on the final unprotect. When the metadata cache destroys a corrupted local heap entry, H5HL__prfx_dest() unlinks it from the heap by setting heap->prfx or heap->dblk to NULL. A crafted HDF5 file can therefore reach H5HL_unprotect() with no cached object to unpin, and the function passes the NULL pointer to H5AC_unpin_entry(). This causes an assertion failure in debug builds and a NULL pointer dereference and crash in release builds. An attacker who can get a user or application to open and traverse a malicious file can cause a denial of service.

---

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