CVE-2025-12638: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in keras-team keras-team/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 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.
CVE-2025-12638: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in keras-team keras-team/keras
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.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2025-11-03T17:43:47.102Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 6929b0784121026312a55d99
Added to database: 11/28/2025, 2:23:52 PM
Last updated: 11/28/2025, 2:24:11 PM
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-12143: CWE-121 Stack-based Buffer Overflow in ABB Terra AC wallbox
MediumCVE-2023-48796: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in Apache Software Foundation Apache DolphinScheduler
HighCVE-2025-13771: CWE-23 Relative Path Traversal in Uniong WebITR
HighCVE-2025-13768: CWE-639 Authorization Bypass Through User-Controlled Key in Uniong WebITR
HighCVE-2025-13770: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Uniong WebITR
HighActions
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.