High severity · published Oct 30, 2025
CVE-2025-12060
Keras keras.utils.get_file Utility Path Traversal Vulnerability
8.9
CVSS
0.6%
EPSS
No
On KEV
Description
The keras.utils.get_file API in Keras, when used with the extract=True option for tar archives, is vulnerable to a path traversal attack. The utility uses Python's tarfile.extractall function without the filter="data" feature. A remote attacker can craft a malicious tar archive containing special symlinks, which, when extracted, allows them to write arbitrary files to any location on the filesystem outside of the intended destination folder. This vulnerability is linked to the underlying Python tarfile weakness, identified as CVE-2025-4517. Note that upgrading Python to one of the versions that fix CVE-2025-4517 (e.g. Python 3.13.4) is not enough. One additionally needs to upgrade Keras to a version with the fix (Keras 3.12).
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 50% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
Keras · Keras
3.0.0 through 3.11.3 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-12060
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-12060
github.com
https://github.com/keras-team/keras/pull/21760
github.com
https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
More from Keras
9.8
CVE-2026-12481
Deserialization of Untrusted Data in keras-team/keras
9.8
CVE-2025-49655
Deserialization of untrusted data can occur in versions of the Keras framework running versions 3.11.0 up to but not including 3.11.3, enabling a maliciously uploaded Keras file…
9.8
CVE-2025-1550
The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=True, through a manually constructed, malicious .keras archive
9.8
CVE-2024-3660
A arbitrary code injection vulnerability in TensorFlow's Keras framework (<2.13) allows attackers to execute arbitrary code with the same permissions as the application using a…
8.1
CVE-2026-11816
Path Traversal in keras-team/keras
