{"cve":"CVE-2025-12060","nvd":{"published":"2025-10-30T17:15:37.520","modified":"2026-10-19T13:10:00.110","status":"Deferred","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).","cvss_v4":{"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","score":8.9},"cvss_v3":null,"cwes":["CWE-22"],"references":["https://github.com/keras-team/keras/pull/21760","https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:14:53.307938015+00:00"},"epss":{"cve":"CVE-2025-12060","score":0.00631,"percentile":0.49965,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-hjqc-jx6g-rwp9","url":"https://osv.dev/vulnerability/GHSA-hjqc-jx6g-rwp9","summary":"Keras Directory Traversal Vulnerability","modified":"2026-07-07T17:57:31.462260108Z","packages":[{"ecosystem":"PyPI","name":"keras","purl":"pkg:pypi/keras","ranges":["<3.12.0"],"fixed":["3.12.0"]}]},{"id":"PYSEC-2026-1486","url":"https://osv.dev/vulnerability/PYSEC-2026-1486","summary":"Keras Directory Traversal Vulnerability","modified":"2026-07-07T17:47:30.403929988Z","packages":[{"ecosystem":"PyPI","name":"keras","purl":"pkg:pypi/keras","ranges":["<3.12.0"],"fixed":["3.12.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}