Keras keras.utils.get_file Utility Path Traversal Vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.
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).
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| keras-team | Keras | 3.0.0 – 3.11.3 | — | No fix listed | CNA |
| — | keras (PyPI) | before 3.12.0 | 3.12.0 | Patch available | GHSA-hjqc-jx6g-rwp9 |
- Keras Vendorkeras-team Affected 3.0.0 – 3.11.3 Fixed in — No fix listed CNA
- keras (PyPI) Vendor— Affected before 3.12.0 Fixed in 3.12.0 Patch available GHSA-hjqc-jx6g-rwp9
Remediation
- Fix · GHSA-hjqc-jx6g-rwp9 keras (PyPI) Fixed in 3.12.0 Advisory →
Red Hat 3 advisories
- RHSA-2026:5807 Released 2026-03-25 · Red Hat rating ImportantRHOAI 2.16.4 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.16 registry.redhat.io/rhoai/odh-codeflare-operator-rhel8, registry.redhat.io/rhoai/odh-dashboard-rhel8, registry.redhat.io/rhoai/odh-data-science-pipelines-argo-argoexec-rhel8 +12
- RHSA-2025:23531 Released 2025-12-17 · Red Hat rating ImportantRHOAI 2.25.1 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-caikit-nlp-rhel9, registry.redhat.io/rhoai/odh-caikit-tgis-serving-rhel9 +34
- RHSA-2025:22759 Released 2025-12-04 · Red Hat rating ImportantRHOAI 2.22.3 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.22 registry.redhat.io/rhoai/odh-dashboard-rhel9, registry.redhat.io/rhoai/odh-data-science-pipelines-argo-argoexec-rhel9, registry.redhat.io/rhoai/odh-data-science-pipelines-operator-controller-rhel9 +8
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift AI 2.16 | Fixed | RHSA-2026:5807 |
| Red Hat OpenShift AI 2.22 | Fixed | RHSA-2025:22759 |
| Red Hat OpenShift AI 2.25 | Fixed | RHSA-2025:23531 |
Not affected: 5 products
- Red Hat Ansible Automation Platform 2
- Red Hat OpenShift AI 2.16
- Red Hat OpenShift AI 2.22
- Red Hat OpenShift AI 2.25
- Red Hat Trusted Artifact Signer
Timeline
- 2026-10-02 Threatist record created from CVE-2025-12060
- 2026-10-03 Alias added: GHSA-hjqc-jx6g-rwp9
- 2026-10-27 EPSS moved to the 50th–90th percentile
References
Advisory 2
Other 5
- https://github.com/keras-team/keras/pull/21760
- https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
- https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
- https://github.com/keras-team/keras
- https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
More keras-team vulnerabilities
- TI-2025-31626 Deserialization of untrusted data in keras-team Keras CVSS 3.1CRITICAL 9.8
- TI-2026-10715 Deserialization of Untrusted Data in keras-team/keras CVSS 3.1CRITICAL 9.8
- TI-2026-01159 Safe Mode Bypass in keras-team/keras CVSS 3.0HIGH 8.8
- TI-2025-08001 Keras safe_mode bypass allows arbitrary code execution when loading a malicious model. CVSS 4.0HIGH 8.6
- TI-2026-10199 Path Traversal in keras-team/keras CVSS 3.0HIGH 8.1
- TI-2025-11591 Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file() CVSS 3.0HIGH 8.0
Sources
- CVE-2025-12060 · CVE Program
- CVE-2025-12060 · NVD
- FIRST EPSS
- GHSA-hjqc-jx6g-rwp9 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-12060 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences