GHSA-9g7v-8wxv-mwxp
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
Automatically patch vulnerabilities without upgrading
CVSS Version



Related Resources
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
