CVE-2025-12060 json
Keras keras.utils.get_file Utility Path Traversal Vulnerability
published last yr. modified 23d ago also EUVD-2025-37039 , GHSA-hjqc-jx6g-rwp9 , PYSEC-2026-1486
- cvss
- 9.8
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 50%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- pypi keras 3.12.0
- keras keras 3.12.0
- github.com/keras-team/keras@47fcb39 commit
- github.com/keras-team/keras#21760 pull request
Is CVE-2025-12060 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-12060 updated cvss 8.3
keras: Keras Path Traversal Vulnerability
-
Red Hat OpenShift AI 2.16 rhoai 1774283191fixed: vendor fix RHSA-2026:5807
-
Red Hat OpenShift AI 2.22 rhoai v2.22.3-1764594508fixed: vendor fix RHSA-2025:22759
-
Red Hat OpenShift AI 2.25 rhoai v2.25.1-1764825096, rhoai v2.25.1-1764961121, rhoai v2.25.1-1765326513, rhoai v2.25.1-1765613316fixed: vendor fix RHSA-2025:23531
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform-26/lightspeed-chatbot-rhel9 Red Hat OpenShift AI 2.16 rhoai 1774282058, rhoai 1774282073, rhoai 1774282078, rhoai 1774282087, rhoai 1774282092, rhoai 1774282093, +18 more Red Hat OpenShift AI 2.22 rhoai v2.22.3-1763051808, rhoai v2.22.3-1763565765, rhoai v2.22.3-1763639678, rhoai v2.22.3-1764181290, rhoai v2.22.3-1764293130, rhoai v2.22.3-1764593039, +17 more Red Hat OpenShift AI 2.25 rhoai 0.0-1763988459, rhoai v2.25.1-1764757768, rhoai v2.25.1-1764757769, rhoai v2.25.1-1764757770, rhoai v2.25.1-1764757772, rhoai v2.25.1-1764757773, +33 more Red Hat Trusted Artifact Signer rhtas/model-transparency-rhel9not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
0.63% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-11).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.9 | 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 | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.9 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | keras | <3.12.0 |
3.12.0 |
Affected products
- Keras Keras
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/keras-team/keras/pull/21760
web
-
github.com
/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
web
-
github.com
/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
web, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-12060
advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-12638
advisory
-
github.com
/keras-team/keras
package
-
huntr.com
/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
web
-
pypi.org
/project/keras
package
-
github.com
/advisories/GHSA-hjqc-jx6g-rwp9
advisory
Sources
- CVE List CVE-2025-12060
- GitHub Advisory GHSA-hjqc-jx6g-rwp9
- NVD CVE-2025-12060
- OSV PYSEC-2026-1486
- Maintainer advisory GHSA-hjqc-jx6g-rwp9
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of keras-team/keras published their own advisory on GitHub. Reviewed sources take precedence over it.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.