CVE-2026-9335: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in keras-team keras-team/keras
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.
AI Analysis
Technical Summary
CVE-2026-9335 is a path traversal vulnerability (CWE-22) in keras-team/keras versions <= 3.14.0. The vulnerability stems from the KerasFileEditor and keras.saving.load_weights functions bypassing the safe_get_h5_group and safe_get_h5_dataset helpers, which are designed to reject HDF5 ExternalLinks and SoftLinks. This bypass results in automatic dereferencing of ExternalLinks to external HDF5 files, enabling an attacker to disclose arbitrary local file contents by providing a malicious .h5, .weights.h5, or .keras file containing such links. The vulnerability allows disclosure of sensitive data from the victim's local filesystem without requiring privileges or causing denial of service.
Potential Impact
An attacker can craft malicious HDF5 files that, when loaded by vulnerable Keras functions, cause disclosure of arbitrary local file contents via ExternalLinks. This compromises confidentiality by exposing sensitive data on the victim's filesystem. There is no indication of integrity or availability impact. The attack requires user interaction (loading a malicious file) but no privileges. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted .h5, .weights.h5, or .keras files that may contain ExternalLinks. Monitoring vendor channels for updates is recommended.
CVE-2026-9335: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in keras-team keras-team/keras
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 v3.0
Score 6.5medium
Affected software
keras-team
keras-team/keras
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-9335 is a path traversal vulnerability (CWE-22) in keras-team/keras versions <= 3.14.0. The vulnerability stems from the KerasFileEditor and keras.saving.load_weights functions bypassing the safe_get_h5_group and safe_get_h5_dataset helpers, which are designed to reject HDF5 ExternalLinks and SoftLinks. This bypass results in automatic dereferencing of ExternalLinks to external HDF5 files, enabling an attacker to disclose arbitrary local file contents by providing a malicious .h5, .weights.h5, or .keras file containing such links. The vulnerability allows disclosure of sensitive data from the victim's local filesystem without requiring privileges or causing denial of service.
Potential Impact
An attacker can craft malicious HDF5 files that, when loaded by vulnerable Keras functions, cause disclosure of arbitrary local file contents via ExternalLinks. This compromises confidentiality by exposing sensitive data on the victim's filesystem. There is no indication of integrity or availability impact. The attack requires user interaction (loading a malicious file) but no privileges. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted .h5, .weights.h5, or .keras files that may contain ExternalLinks. Monitoring vendor channels for updates is recommended.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2026-05-22T23:38:39.544Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 6a6ecfa7bf32cb7a345a5080
Added to database: 08/02/2026, 05:03:35 UTC
Last enriched: 08/09/2026, 14:20:49 UTC
Last updated: 09/16/2026, 22:01:39 UTC
Views: 71
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.