# CVE-2025-12060: Keras keras.utils.get_file Utility Path Traversal Vulnerability

- Severity: High 8.9 (CVSS:4.0, scored by Google) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.65%, higher than 52% of CVEs (2026-12-01)
- Published: 2025-10-30T17:10:43.868Z
- Modified: 2026-10-19T13:10:00.110Z
- Also known as: GHSA-hjqc-jx6g-rwp9, PYSEC-2026-1486
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Google

## 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).

(As written by CVE List.)

## Affected

- util: from 3.0.0 up to 3.11.3
- keras (PyPI): before 3.12.0

## Every score

- Google: CVSS:4.0 8.9 High `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`
- GitHub: CVSS:3.1 9.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `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`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/keras-team/keras/pull/21760> (web)
- <https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-12060> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-12638> (advisory)
- <https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951> (web)
- <https://github.com/keras-team/keras> (package)
- <https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4> (web)
- <https://pypi.org/project/keras> (package)
- <https://github.com/advisories/GHSA-hjqc-jx6g-rwp9> (advisory)

## Sources

- CVE List: [CVE-2025-12060](https://www.cve.org/CVERecord?id=CVE-2025-12060), CVE Terms of Use, modified 2026-02-26
- GitHub Advisory Database: [GHSA-hjqc-jx6g-rwp9](https://github.com/advisories/GHSA-hjqc-jx6g-rwp9), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-12060](https://nvd.nist.gov/vuln/detail/CVE-2025-12060), Public domain, modified 2026-10-19
- PyPA Advisory Database: [PYSEC-2026-1486](https://osv.dev/vulnerability/PYSEC-2026-1486), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-12060 · Whole record: https://cve.day/CVE-2025-12060.json · Rebuilt by cve.day 2026-11-25T22:59:07.052Z
