CVE-2025-12638 | Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()

Keras version 3.11.3 is affected by a path traversal vulnerability in the keras.utils.get_file() function when extracting tar archives. The vulnerability arises because the function uses Python's tarfile.extractall() method without the security-critical filter='data' parameter. Although Keras attempts to filter unsafe paths using filter_safe_paths(), this filtering occurs before extraction, and a PATH_MAX symlink resolution bug triggers during extraction. This bug causes symlink resolution to fail due to path length limits, resulting in a security bypass that allows files to be written outside the intended extraction directory. This can lead to arbitrary file writes outside the cache directory, enabling potential system compromise or malicious code execution. The vulnerability affects Keras installations that process tar archives with get_file() and does not affect versions where this extraction method is secured with the appropriate filter parameter.

Published: 2025-11-28 Last update: 2026-04-15 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2025-12638 is rated Low Risk (35.1/100): CVSS High severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-12638

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-11-29 0.03%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-12638

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.0 3.0 HIGH
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.1 5.9 [email protected]

Weakness enumeration for CVE-2025-12638

GitHub Security Advisory for CVE-2025-12638

GHSA-9g7v-8wxv-mwxp · Severity: high · Ecosystem: pip — Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack

OS Trackers for CVE-2025-12638

vendor priority summary link
debian not yet assigned CVE-2025-12638 not yet assigned priority: Debian including 1 source packages (keras), 1 status rows across 1 suites (bullseye): open 1. https://security-tracker.debian.org/tracker/CVE-2025-12638
redhat high https://access.redhat.com/security/cve/CVE-2025-12638
ubuntu medium CVE-2025-12638 medium priority: Ubuntu including 1 source packages (keras), 7 status rows across 7 suites (bionic, focal, jammy, noble, plucky, questing, upstream): DNE 4, needs-triage 3. https://ubuntu.com/security/CVE-2025-12638

Affected software / configurations for CVE-2025-12638

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2025-12638

cvelogic Threat Intelligence