CVE-2026-120689

Uncontrolled Recursion in HDF5 H5B__iterate_helper() via Crafted File

Published Nov 2, 2026 CVSS 4.0 · 4.3 Medium EPSS < 1% KEV · Not listed
Description
HDF5 through 2.2.0 contains an uncontrolled recursion vulnerability in H5B__iterate_helper() in src/H5B.c. When iterating a version 1 B-tree, the function does not verify that a child node’s level matches the expected level. That check is performed only in H5B__cache_deserialize() when a node is first loaded into the metadata cache. A crafted HDF5 file whose B-tree child pointer refers back to a node already in the cache, such as a node that points to itself, bypasses the check and causes unbounded recursion, leading to stack exhaustion and a crash. This can be triggered by calling H5Gget_info() or H5Gget_num_objs() on a group in the crafted file, which reaches H5B_iterate() through H5G__obj_info() and H5G__stab_count(). An attacker who can get a user or application to open a malicious file can cause a denial of service.

Analysis

AI-generated

Technical impact

HDF5 through version 2.2.0 contains an uncontrolled recursion flaw in the internal B‑tree iteration routine. When a version‑1 B‑tree contains a child node that points back to a node already present in the metadata cache, the level verification performed during node loading is skipped. The recursive helper routine then recurses without bound, exhausting the call stack and causing the process to terminate. The vulnerability is a CWE‑674 (Unchecked Recursion) and CWE‑835 (Uncontrolled Recursion) fault, which results solely in a denial of service – no code execution or privilege escalation can occur.

Affected Systems

The affected product is HDF5 from the HDF Group. All releases up to and including 2.2.0 are vulnerable. Any application that opens an HDF5 file – such as scientific, engineering, or data‑analysis software – can trigger the fault if the file is maliciously crafted. Systems that process untrusted HDF5 files, even locally, are at risk.

Risk and Exploitability

The CVSS base score of 4.3 indicates moderate severity. Exploitation requires the victim to open a specially crafted HDF5 file, so the attack vector is local or user‑initiated file access; remote exploitation is not evident. The EPSS score of less than 1% shows a very low but non‑zero probability of exploitation in the wild, and the vulnerability is not listed in CISA’s KEV catalog. Nonetheless, the impact is a full denial of service for the affected process and should be addressed promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to HDF5 version 2.2.1 or later to eliminate the recursion flaw.
  • Prevent untrusted applications from opening arbitrary HDF5 files; restrict file access or validate file sources before loading.
  • Run applications that read HDF5 data in a sandboxed environment or impose stack size limits to detect and contain stack exhaustion.

Generated by OpenCVE AI on November 4, 2026 at 10:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-835
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-665
Type Values Removed Values Added
First Time appeared Hdfgroup
Hdfgroup hdf5
Weaknesses CWE-665
Vendors & Products Hdfgroup
Hdfgroup hdf5
Type Values Removed Values Added
Weaknesses CWE-674
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description HDF5 through 2.2.0 contains an uncontrolled recursion vulnerability in H5B__iterate_helper() in src/H5B.c. When iterating a version 1 B-tree, the function does not verify that a child node’s level matches the expected level. That check is performed only in H5B__cache_deserialize() when a node is first loaded into the metadata cache. A crafted HDF5 file whose B-tree child pointer refers back to a node already in the cache, such as a node that points to itself, bypasses the check and causes unbounded recursion, leading to stack exhaustion and a crash. This can be triggered by calling H5Gget_info() or H5Gget_num_objs() on a group in the crafted file, which reaches H5B_iterate() through H5G__obj_info() and H5G__stab_count(). An attacker who can get a user or application to open a malicious file can cause a denial of service.
Title Uncontrolled Recursion in HDF5 H5B__iterate_helper() via Crafted File
References
Metrics cvssV4_0

{'score': 4.3, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U'}

Weaknesses
  • CWE-674

    Uncontrolled Recursion

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
HDFG
Published
Updated
Nov 2, 2026, 7:52 PM
Reserved
Nov 2, 2026, 7:32 PM
Status
Awaiting Analysis
Published
Nov 2, 2026, 8:17 PM
Modified
Nov 3, 2026, 4:25 PM
Severity
Moderate
Public date
Nov 2, 2026, 7:39 PM