CVE-2025-12638
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-11-28

Last updated on: 2025-11-28

Assigner: huntr.dev

Description
Keras version 3.11.3 is affected by a path traversal vulnerability in the keras.utils.get_file() 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 filter_safe_paths(), this filtering occurs before extraction, and a PATH_MAX 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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-11-28
Last Modified
2025-11-28
Generated
2026-05-07
AI Q&A
2025-11-28
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
keras keras 3.11.3
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a path traversal issue in Keras version 3.11.3 within the keras.utils.get_file() function when extracting tar archives. The function uses Python's tarfile.extractall() without the necessary security filter parameter, and although Keras tries to filter unsafe paths before extraction, a symlink resolution bug related to path length limits allows files to be written outside the intended extraction directory. This bypass can lead to arbitrary file writes outside the cache directory.


How can this vulnerability impact me? :

The vulnerability can allow an attacker to write files outside the intended extraction directory, potentially leading to arbitrary file writes on the system. This can result in system compromise or execution of malicious code, posing a serious security risk.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, immediately update Keras to a version where the keras.utils.get_file() function uses the secure extraction method with the appropriate filter parameter to prevent path traversal. Avoid processing untrusted tar archives with vulnerable Keras versions. Additionally, restrict permissions of the cache directory to limit potential damage from arbitrary file writes.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart