CVE-2025-12060

Keras keras.utils.get_file Utility Path Traversal Vulnerability

Published Oct 30, 2025 CVSS 4.0 · 8.9 High EPSS < 1% KEV · Not listed
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).

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-28jp-44vh-q42h Keras keras.utils.get_file API is vulnerable to a path traversal attack
Github GHSA Github GHSA GHSA-hjqc-jx6g-rwp9 Keras Directory Traversal Vulnerability
History
Type Values Removed Values Added
CPEs cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:*
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Keras
Keras keras
Vendors & Products Keras
Keras keras
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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).
Title Keras keras.utils.get_file Utility Path Traversal Vulnerability
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 8.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
Google
Published
Updated
Feb 26, 2026, 4:56 PM
Reserved
Oct 22, 2025, 10:17 AM
Status
Deferred
Published
Oct 30, 2025, 5:15 PM
Modified
Oct 19, 2026, 1:10 PM
Severity
Important
Public date
Oct 30, 2025, 5:10 PM