CVE-2025-12638 Details
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.
A path traversal vulnerability has been identified in Keras version 3.11.3, specifically within the `keras.utils.get_file()` function when it extracts tar archives. The issue arises because the function utilizes Python's `tarfile.extractall()` method without the necessary security filter, allowing malicious tar files to bypass path safety checks and write files outside the designated extraction directory. This flaw can lead to arbitrary file writes beyond the cache directory, potentially compromising the system or enabling the execution of malicious code.
To address this vulnerability, Keras should modify the extraction method to include the filter parameter, ensuring that tar files are processed safely. This can be done by using `tarfile.extractall(path, filter='data')` instead of the current approach.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Nov 28, 2025CISA-ADP
Assessed Nov 28, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4 | [email protected] | ExploitTechnical Description |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Keras | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 28, 2025 | New CVE Received | [email protected] |
Volerion