CVE-2025-12638: Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()

Published Nov 28, 2025
·
Updated

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.getfile() 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 filtersafepaths(), this filtering occurs before extraction, and a PATHMAX 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 getfile() and does not affect versions where this extraction method is secured with the appropriate filter parameter.

Other sources

Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.getfile()

Microsoft

Affected Software

3 affected componentsFixes available
Keras Keras=3.11.3
pip/Keras<3.12.0
3.12.0
Microsoft azl3 keras 3.3.3-5

Event History

Nov 28, 2025
CVE Published
via MITRE·02:06 PM
Data Sourced
via MITRE·02:06 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:30 PM
Data Sourced
via GitHub·03:30 PM
DescriptionSeverityWeaknessAffected Software
Dec 2, 2025
Withdrawn
via GitHub·12:09 AM
Dec 3, 2025
Data Sourced
via Microsoft·01:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·01:02 AM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-12638?

CVE-2025-12638 is classified as a high-severity vulnerability due to its potential for unauthorized access and exploitation.

2

How do I fix CVE-2025-12638?

To fix CVE-2025-12638, update Keras to a version that implements security filters in the keras.utils.get_file() function.

3

What software versions are affected by CVE-2025-12638?

CVE-2025-12638 specifically affects Keras version 3.11.3.

4

What type of vulnerability is CVE-2025-12638?

CVE-2025-12638 is a path traversal vulnerability that can lead to file extraction in unintended directories.

5

How does CVE-2025-12638 affect the security of applications using Keras?

CVE-2025-12638 can allow attackers to exploit the path traversal vulnerability, potentially leading to unauthorized access to sensitive files on the system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203