Skip to content
HighVulnerability

CVE-2025-12060: Keras get_file path traversal via tar archive extraction

Identifier
CVE-2025-12060
Published
Record updated
View JSON
Affected
  • keras <= 3.11.3
Fixed in
3.12.0
  • released October 27, 2025, 3 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.6%

Summary

The keras.utils.get_file API in Keras, when called with extract=True on tar archives, is vulnerable to path traversal because it uses Python's tarfile.extractall without filter="data". A remote attacker can supply a malicious tar archive with crafted symlinks that, when extracted, writes arbitrary files outside the intended destination folder. The flaw is linked to the underlying Python tarfile weakness CVE-2025-4517.

Mitigation

Upgrading Python to a version that fixes CVE-2025-4517 (e.g. Python 3.13.4) is not enough. Upgrade Keras to a version with the fix (Keras 3.12).