Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
9.4

CVE-2025-12060: Keras download can overwrite any system file

CVE-2025-12060 · published 1 year ago
Summary

The Keras library’s file‑download function can extract tar archives without checking their contents. If an attacker supplies a specially crafted archive, it can place files anywhere on your server, potentially overwriting important data. Update Keras to version 3.12 or later to stop this behavior.

What to do
  • Update keras team keras to version 3.12.0.
  • Update keras to version 3.11.3+aikido.2.
  • Update keras to version 3.11.3+aikido.3.
Affected software
Ecosystem VendorProductAffected versions
pip keras team keras <= 3.11.3
Fix: upgrade to 3.12.0
Root:PyPI – keras < 3.11.3+aikido.2
< 3.11.3+aikido.3
Fix: upgrade to 3.11.3+aikido.2
Debian:11 debian keras All versions
Ubuntu:18.04:LTS canonical keras All versions
Original advisory text
CVE-2025-12060 in keras - Patched by Root
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).
Fix within
Internet-facing 14 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker full control
Severity
9.4 Critical
Exploitation
<1% chance of attack within 30 days
Type
CWE-22Path Traversal
Timeline
Published30 Oct 2025
Updated3 Dec 2026
First seen6 Mar 2026
Track software like this
Free during beta