Skip to main content

Keras CVE-2026-12479

| EUVDEUVD-2026-38265 MEDIUM
Path Traversal (CWE-22)
2026-06-22 @huntr_ai GHSA-gh82-f9x8-5frx
6.1
CVSS 3.0 · Vendor: huntr_ai
View

Attack ChainAIDerived

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

  1. Access
    Craft Keras model with traversal layer names
  2. Delivery
    Distribute poisoned model via repository or direct delivery
  3. Exploit
    Victim loads or saves model in Keras 3.14.0
  4. Execution
    DiskIOStore.make constructs path from layer name without sanitization
  5. Persist
    Path traversal escapes temporary working directory
  6. Impact
    Arbitrary file or directory created on victim file system

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 that a victim explicitly invoke a Keras model save or load operation - specifically any code path that exercises DiskIOStore.make - against a model file containing layer names with directory traversal sequences (.. components). The CVSS UI:R metric confirms that passive victims cannot be exploited; the victim must actively trigger the model operation. Forward slashes (/) in layer names are blocked by Keras input restrictions, limiting traversal syntax to pure .. sequences without embedded slashes, which restricts but does not eliminate path traversal options depending on OS path parsing. The attacker requires no privileges (PR:N) to craft and distribute the malicious model file. Exploitation is further limited by the OS-level write permissions of the process running Keras: if the process runs as a low-privilege user without write access to sensitive system directories, the traversal can only write to paths accessible to that user, reducing potential impact. Non-default configurations or special feature flags are not required - the DiskIOStore code path is exercised during standard Keras model save/load operations on Keras 3.14.0.

Impact

The CVSS 3.0 score of 6.1 (AV:L/AC:L/PR:N/UI:R/S:C) reflects a local attack vector with user interaction required and a changed scope - the scope change is the key elevating factor, as writes can escape the Keras temporary directory and affect the broader file system. Real-world risk is moderate but context-dependent: the primary threat model is supply chain or social engineering, where a researcher or practitioner is tricked into loading a poisoned model from an untrusted source (e.g., Hugging Face Hub, email attachment, research artifact). The AV:L designation aligns with the local execution model of Keras; this is not a remotely triggerable server-side vulnerability in default deployments. No KEV listing means confirmed in-the-wild exploitation is absent. No EPSS score was provided, so exploitation probability cannot be quantitatively benchmarked. The PR:N metric is notable: the attacker requires no privileges to craft the malicious model - only the victim's UI:R is the gating condition. For ML practitioners who routinely load third-party models, the realistic risk is higher than for isolated environments. Integrity impact (I:L) is the primary concern; confidentiality is secondary and limited.

Exploit ScenarioDerived

An attacker publishes a research model to a public repository (e.g., Hugging Face Hub or a GitHub release) where layer names contain traversal sequences such as ../../.config/autostart/backdoor or similar paths meaningful to the target OS. A data scientist or ML engineer downloads and loads the model using Keras 3.14.0 as part of routine experimentation; during the load operation, DiskIOStore.make constructs a path using the malicious layer name and writes a file outside the intended temporary directory to the attacker-controlled path. No public proof-of-concept exploit has been identified at time of analysis, but the attack primitive is straightforward and requires only knowledge of Keras model serialization format.

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

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

Alert me

AnalysisAIv1 – Jun 22, 2026

Path traversal in Keras 3.14.0 exposes local file systems to arbitrary file and directory creation when processing maliciously crafted model files. The DiskIOStore.make method constructs directory paths from user-supplied layer names without sanitizing directory traversal sequences (..); since only forward slashes are blocked, embedding .. components in a layer name allows escape from the intended temporary working directory during model save or load operations. No active exploitation (CISA KEV) and no public proof-of-concept has been identified at time of analysis; however, EPSS data was not provided, leaving probabilistic exploitation likelihood unquantified.

RemediationAI

No vendor-released patch or confirmed fixed version is identified in the available data - patch availability is unknown at time of analysis. Users should monitor the huntr bounty advisory at https://huntr.com/bounties/188836b9-12fc-49c7-8dbf-04f60fe33743 and the keras-team/keras GitHub repository for an official fix. As an immediate compensating control, avoid loading Keras models from untrusted or unverified sources, as model files are the delivery mechanism for this attack. If model loading from external sources is operationally required, implement a pre-load validation step that inspects all layer names for directory traversal sequences (e.g., reject any name containing ..) before invoking save or load methods; this adds a processing step but prevents exploitation without waiting for an upstream patch. Additionally, restrict the OS-level write permissions of the process running Keras to the minimum required directories, so that even if traversal succeeds, the process cannot write to sensitive system paths - this reduces impact but does not eliminate the vulnerability. Sandboxing model loading in a container or restricted environment with read-only mounts to critical paths is a high-efficacy workaround with the trade-off of added operational complexity.

Affected VersionsENISA

keras-team/keras unspecified ≤latest

Affected Packages

pypi keras fix: 3.12.3, 3.15.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

Keras 3 uses a DiskIOStore abstraction for model serialization, where the make method is responsible for constructing on-disk directory structures that mirror the model's layer hierarchy. Layer names sourced from model metadata are concatenated directly into file system paths without stripping parent directory components (CWE-22: Improper Limitation of a Pathname to a Restricted Directory). While the implementation blocks forward slashes (/) in layer names as a partial defense, it fails to reject or normalize sequences such as '..' which are equally effective for traversal on POSIX and Windows systems. The CPE cpe:2.3:a:keras-team:keras-team/keras:*:*:*:*:*:*:*:* uses a wildcard version field, indicating the affected version range beyond 3.14.0 is not precisely bounded in available intelligence. The attack surface is the model deserialization pipeline, a class of vulnerability increasingly common in ML frameworks where model files are treated as trusted data.

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.1 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
vuln.today AI 6.1 MEDIUM

AV:L because the path traversal triggers during local model load/save; UI:R because victim must actively open the crafted model; S:C reflects file writes escaping the intended Keras temporary directory boundary.

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

Primary rating from Vendor (huntr_ai).

CVSS VectorVendor: huntr_ai

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low

DescriptionCVE.org

A path traversal vulnerability exists in keras-team/keras version 3.14.0, specifically in the DiskIOStore.make method within the Keras 3 model saving and loading library. This vulnerability arises from the improper handling of user-provided layer names, which are used to construct directory paths without sanitizing for parent directory components (..). While forward slashes (/) are restricted in layer names, directory traversal sequences are not. This allows an attacker to craft a malicious Keras model that, when saved or loaded, can escape the intended temporary working directory and perform unauthorized file system operations, such as creating directories or writing files in arbitrary locations.

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.3%
Top 83% exploitable
Prevalence
High
ML framework, widely used in production deep learning
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor 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.3%
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
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
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.

Vendor StatusVendor

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