CVE-2025-12638: keras-team keras-team/keras Path Traversal
Vulnerability summary
CVE-2025-12638 is a high (CVSS 8.0) Path Traversal vulnerability in keras-team keras-team/keras. EPSS estimates a 0.65% chance of exploitation in the next 30 days, higher than 50.4% of scored vulnerabilities.
Timeline
- 28-11-2025PublishedVulnerability first disclosed.
- 28-11-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · PypiEcosystem advisory · calculated8.0HighCVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated8.0HighCVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.0HighCVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- NVDNIST8.0HighCVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.65%
Chance of exploitation in the next 30 days
Percentile
50%
Versus all other CVEs
30-day change
0.00 pp
From 0.65% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian1 product
- kerasAll versions (No fix recorded)
Keras-team1 product
- keras-team/keras≥ unspecified, ≤ latest
PyPI1 product
- keras< 3.12.0
Ubuntu1 product
- kerasAll versions (No fix recorded)
4 vendors · 4 products
References
7 links- github.com/keras-team/kerasPACKAGE