CVE-2025-12638
published 2025-11-28CVE-2025-12638: 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…
PriorityP351high8CVSS 3.0
AVNACLPRLUIRSUCHIHAH
EPSS
0.65%
48.3th percentile
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.
Affected
4 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | keras | — | — |
| keras-team | keras-team_keras | unspecified – latest | — |
| keras | keras | >= 0 < 3.12.0 | 3.12.0 |
| msrc | azl3_keras_3.3.3-5_on_azure_linux_3.0 | — | — |
CVSS provenance
nvdv3.08.0HIGHCVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
osv8.0HIGH
vendor_debian8.0HIGH
vendor_redhat8.0HIGH
vendor_msrc7.6HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Red Hat
keras: Path Traversal Vulnerability in keras
vendor_redhat·2025-11-28·CVSS 8.0
CVE-2025-12638 [HIGH] CWE-22 keras: Path Traversal Vulnerability in keras
keras: Path Traversal Vulnerability in keras
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
Microsoft
Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()
vendor_msrc·2025-11-11·CVSS 7.6
CVE-2025-12638 [HIGH] CWE-22 Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()
Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()
Mariner: Mariner
@huntr_ai: @huntr_ai
Customer Action Required: Yes
Debian
CVE-2025-12638: keras - Keras version 3.11.3 is affected by a path traversal vulnerability in the keras....
vendor_debian·2025·CVSS 8.0
CVE-2025-12638 [HIGH] CVE-2025-12638: keras - Keras version 3.11.3 is affected by a path traversal vulnerability in the keras....
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 Kera
OSV
CVE-2025-12638: Keras version 3
osv·2025-11-28·CVSS 8.0
CVE-2025-12638 [HIGH] CVE-2025-12638: Keras version 3
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 Kera
GHSA
Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack
ghsa·2025-11-28
CVE-2025-12638 [HIGH] CWE-22 Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack
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.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 len
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2025-11-28
Published