SecurityContext

CVE-2025-12060: Keras - Path Traversal

  • Cve: CVE-2025-12060
  • Name: Keras - Path Traversal
  • 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).
  • Impact: Remote attackers can write arbitrary files anywhere on the filesystem, potentially leading to code execution or system compromise.
  • Remediation: Upgrade to Keras 3.12 and Python 3.13.4 or later.
  • Vulnerability type: path_traversal
  • Vulnerability impact: file_system_write
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.9
  • Cvss 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/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
  • Epss score: 0.00646
  • Epss percentile: 0.51717
  • Assignee: [email protected]
  • Published at: 2025-10-30T17:15:37Z
  • Age in days: 390
  • Modified at: 2026-10-19T13:10:00Z
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-12060
  • Nvd status: deferred
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-22Improper Limitation of a Pathname to a Restricted Directory

References

UrlSourceTags
https://github.com/keras-team/keras/pull/21760nvd
https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9nvd

Products

ProductAffectedPlatform boundSourcesUrl
keras:keras>= 3.0.0, <= 3.11.3nocna/v1/products/keras/keras

Projects

RepositoryLink kindsIndexedUrl
keras-team/kerascommit, fix, package, pull, security_advisoryyes/v1/repositories/keras-team/keras

Index

  • Repositories: 156
  • Repositories high signal: 74
  • Packages: 1

Exploitation

  • Remote: yes
  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts