CVE-2025-12060: Keras Directory Traversal Vulnerability
Affects kerasSource GCVE Database
Not known to be exploited · CVSS 9.8 Critical : upgrade to 3.12.0 as a priority.
Data as of 21 Nov 2026, 03:47 UTC
- Patch
- Available – fixed in 3.12.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 2 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 20 Nov 2026.
What to do
Upgrade keras to 3.12.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIkeras | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in Keras version 3.12.0 that addresses this vulnerability by properly handling path filtering during tar archive extraction. Users should upgrade to Keras 3.12.0 or later to remediate this issue. No additional mitigation is required once the patch is applied.
Description
Keras's get_file() function is vulnerable to a directory traversal attack due to improper handling of symlink resolution in tar archive extraction. The vulnerability arises from a PATH_MAX symlink resolution bug in Python's tarfile module, which allows malicious tar archives to bypass Keras's path filtering and write files outside the intended extraction directory. This issue is fixed in Keras version 3.12.0.
References
- github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-12060 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-12638 (opens in a new tab)
- github.com/keras-team/keras/pull/21760 (opens in a new tab)
- github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951 (opens in a new tab)
- github.com/keras-team/keras (opens in a new tab)
- huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4 (opens in a new tab)