Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

GHSA-9g7v-8wxv-mwxp

Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack
Back to all
CVE

GHSA-9g7v-8wxv-mwxp

Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-hjqc-jx6g-rwp9. This link is maintained to preserve external references.

Original Description

Keras version 3.11.3 is affected by a path traversal vulnerability in the keras.utils.getfile() function when extracting tar archives. The vulnerability arises because the function uses Python's tarfile.extractall() method without the security-critical filter='data' parameter. Although Keras attempts to filter unsafe paths using filtersafepaths(), this filtering occurs before extraction, and a PATHMAX symlink resolution bug triggers during extraction. This bug causes symlink resolution to fail due to path length limits, resulting in a security bypass that allows files to be written outside the intended extraction directory. This can lead to arbitrary file writes outside the cache directory, enabling potential system compromise or malicious code execution. The vulnerability affects Keras installations that process tar archives with get_file() and does not affect versions where this extraction method is secured with the appropriate filter parameter.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
-
C
H
U
8
-
3.0
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://nvd.nist.gov/vuln/detail/CVE-2025-12638, https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951, https://github.com/keras-team/keras, https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4

Severity

8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
8
EPSS Probability
0%
EPSS Percentile
0%
Introduced Version
0
Fix Available
3.12.0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading