Skip to main content

Keras EUVDEUVD-2026-51922

| CVE-2026-9335 MEDIUM
Path Traversal (CWE-22)
2026-08-02 @huntr_ai GHSA-m8wh-29wm-52mv
6.5
CVSS 3.0 · Vendor: huntr_ai
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft H5 file with ExternalLink to target path
  2. Delivery
    Distribute malicious file to victim
  3. Exploit
    Victim loads file via Keras API
  4. Execution
    ExternalLink auto-dereferences to local filesystem
  5. Persist
    Sensitive HDF5 file content extracted into model/editor state
  6. Impact
    Attacker retrieves data via application output or side channel

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to actively load a malicious .h5, .weights.h5, or .keras file using either KerasFileEditor or keras.saving.load_weights on a machine running keras-team/keras 3.14.0 or earlier. No special server configuration, authentication, or elevated privileges are required on the attacker's side; the attacker only needs to embed a valid HDF5 ExternalLink in a crafted file. Exploitation is limited to the confidentiality of files accessible to the victim's process user account on the local filesystem that are themselves parseable as HDF5 - non-HDF5 files pointed to by an ExternalLink will not be read successfully. User interaction (UI:R) is the single required limiting condition: the victim must take the deliberate action of calling one of the two affected APIs on attacker-supplied input. No network listener is needed on the attacker's side post-delivery; data exfiltration occurs entirely within the victim's local process and must be routed out via a secondary channel (e.g., if the calling application transmits loaded weights to a remote endpoint).

Impact

The CVSS 3.0 base score of 6.5 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N) accurately reflects the attack profile: network-deliverable, low complexity, no attacker privileges required, but dependent on the victim actively loading a malicious file. The High confidentiality impact is justified - the victim's local HDF5-formatted files, which may include other model weight files containing proprietary training data or sensitive embedded attributes, are fully exposed. No CISA KEV listing exists, and no independent EPSS data was provided in the source intelligence; exploitation probability should therefore be treated as unknown rather than low. Real-world risk is elevated in the ML/AI practitioner community, where sharing pre-trained model weight files via repositories, forums, or direct transfer is a common and normalized workflow - the social engineering vector is realistic. Integrity and availability are unaffected. There is no signal of a scope change: exploitation is confined to the victim's user context. The CVSS vector is internally consistent with the description; no conflicts to flag.

Exploit ScenarioDerived

An attacker crafts a malicious attacker_payload.weights.h5 file containing an HDF5 ExternalLink at the expected 'layers' key, pointing to a sensitive file on the victim's filesystem such as another model file, a private key stored in HDF5 format, or any HDF5-parseable configuration artifact. The attacker distributes this file via a model-sharing platform, a research forum, or a direct download link, social-engineering the victim into loading it with KerasFileEditor(attacker_payload.weights.h5) or model.load_weights(attacker_payload.weights.h5). Upon loading, Keras automatically dereferences the ExternalLink, extracts attributes and datasets from the target file into its internal structures, and either returns them to the attacker-controlled calling code or silently loads them as model weights - disclosing the referenced file's content without any error.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 02, 2026

Local HDF5 file content disclosure in keras-team/keras versions 3.14.0 and earlier allows an attacker who can deliver a malicious model file to exfiltrate arbitrary local filesystem data from a victim's machine. Both the KerasFileEditor class and keras.saving.load_weights function fail to invoke the safe_get_h5_group and safe_get_h5_dataset helpers before traversing HDF5 group children, causing automatic dereferencing of embedded ExternalLinks and SoftLinks that point to attacker-controlled paths on the victim's filesystem. No public exploit code or CISA KEV listing has been identified at time of analysis; however, the attack mechanism is straightforward and the commit diff makes the vulnerability trivially reproducible.

RemediationAI

Upgrade keras-team/keras to any version that incorporates commit 23370f16b0ab9a200f7550a34e54a3ceab74ba0e (https://github.com/keras-team/keras/commit/23370f16b0ab9a200f7550a34e54a3ceab74ba0e); the upstream fix in git is confirmed but an exact tagged release version was not provided in the available intelligence - verify the installed version includes this commit before treating the environment as patched. Until a patched package is deployed, the most effective compensating control is to never load HDF5 model files from untrusted or unverified sources; this is actionable for teams with controlled model provenance pipelines. For applications that must accept user-supplied model files, consider sandboxing the Keras loading process in a restricted environment (e.g., a container with no access to sensitive local files) so that any ExternalLink dereference can only reach an empty or isolated filesystem. Disabling or restricting access to the KerasFileEditor API surface in production inference services is advisable as a defense-in-depth measure. The full vulnerability report is at https://huntr.com/bounties/876a7226-5428-4a66-9d05-232461120db5.

Affected VersionsENISA

keras-team/keras unspecified <3.12.3, 3.15.0

Affected Packages

pypi keras fix: 3.12.3, 3.15.0
euvd keras_team_keras_unspecified_3_12_3 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Keras uses the HDF5 file format (via the h5py library) to store and load model weights in .h5, .weights.h5, and .keras files. HDF5 supports two link types beyond normal hard links: ExternalLinks, which reference a group or dataset inside a separate HDF5 file on the local filesystem by path, and SoftLinks, which reference a path within the same file symbolically. The h5py library automatically dereferences these links during traversal unless explicitly checked. Keras had implemented safe wrapper helpers - safe_get_h5_group and safe_get_h5_dataset - that detect and reject ExternalLink and SoftLink objects before access, but KerasFileEditor._extract_weights_from_store called data.get(key) directly, bypassing these guards entirely. Under CWE-22 (Path Traversal), the attacker controls the filesystem path embedded in the ExternalLink, directing Keras to read any HDF5-parseable file the victim process can access. Affected product per CPE: cpe:2.3:a:keras-team:keras-team/keras:*:*:*:*:*:*:*:*.

Know when Keras Team Keras gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (huntr_ai) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
vuln.today AI 6.5 MEDIUM

AV:N because the malicious file is delivered over the network; UI:R because the victim must actively invoke a Keras loading function; no integrity or availability impact from file disclosure alone.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 5.0 MEDIUM

Primary rating from Vendor (huntr_ai).

CVSS VectorVendor: huntr_ai

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

1
Patch available
Aug 02, 2026 - 06:01 EUVD

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on keras (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.13.0.

Threat Intelligence Overview

EPSS Score
0.6%
Top 53% exploitable
Prevalence
Medium
popular deep learning framework, dominant in ML/AI research and production
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

Debian

keras
Release Status Fixed Version Urgency
bullseye fixed (unfixed) end-of-life
(unstable) fixed (unfixed) -

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy