CVE-2025-12638
BaseFortify
Publication date: 2025-11-28
Last updated on: 2025-11-28
Assigner: huntr.dev
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| keras | keras | 3.11.3 |
Helpful Resources
Exploitability
| 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.