CVE-2026-9335
Received Received - Intake

Arbitrary Local HDF5 File Content Disclosure in Keras

Vulnerability report for CVE-2026-9335, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-02

Last updated on: 2026-08-02

Assigner: huntr.dev

Description

A vulnerability in keras-team/keras versions <= 3.14.0 allows arbitrary local HDF5 file content disclosure due to improper handling of HDF5 ExternalLinks. The `KerasFileEditor` and `keras.saving.load_weights` functions bypass the `safe_get_h5_group` and `safe_get_h5_dataset` helpers, which are designed to reject ExternalLinks and SoftLinks. This results in automatic dereferencing of links to external HDF5 files, enabling attackers to disclose sensitive data from the victim's local filesystem. Specifically, `KerasFileEditor` extracts attributes and datasets from linked files into its internal structures, while `keras.saving.load_weights` loads weights from linked files into the user's model. This issue can be exploited by providing a malicious `.h5`, `.weights.h5`, or `.keras` file containing ExternalLinks.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-02
Last Modified
2026-08-02
Generated
2026-08-02
AI Q&A
2026-08-02
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
keras-team keras to 3.14.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects keras-team/keras versions <= 3.14.0. It allows disclosure of arbitrary local HDF5 file content due to improper handling of HDF5 ExternalLinks. The KerasFileEditor and keras.saving.load_weights functions bypass security helpers that reject ExternalLinks and SoftLinks. Attackers can exploit this by providing malicious .h5, .weights.h5, or .keras files containing ExternalLinks to access sensitive data from the victim's local filesystem.

Detection Guidance

To detect this vulnerability, inspect Keras model files (.h5, .weights.h5, .keras) for ExternalLinks using HDF5 tools. Use commands like 'h5ls -r <file>' to list objects and check for external references. Review code using KerasFileEditor or keras.saving.load_weights for improper link handling.

Impact Analysis

If you use keras-team/keras <= 3.14.0, an attacker could trick you into loading a malicious HDF5 file. This could lead to unauthorized disclosure of sensitive files on your local system. The attacker needs to provide you with a specially crafted file, but once loaded, they can access data from linked external files without your knowledge.

Compliance Impact

This vulnerability could lead to unauthorized data disclosure, violating GDPR's data protection principles and HIPAA's confidentiality requirements. If sensitive personal or health data is exposed, organizations may face legal penalties, reputational damage, and loss of trust. Compliance programs must address this risk to maintain regulatory adherence.

Mitigation Strategies

Update keras-team/keras to version 3.14.0 or later to address the vulnerability. Avoid using untrusted .h5, .weights.h5, or .keras files containing ExternalLinks. Review file parsing logic to ensure safe_get_h5_group and safe_get_h5_dataset helpers are used consistently.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-9335. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart