Skip to content
HighVulnerability

CVE-2025-12638: Keras path traversal in keras.utils.get_file() tar extraction

Identifier
CVE-2025-12638
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.7%

Summary

Keras 3.11.3 contains a path traversal flaw in keras.utils.get_file() when it extracts tar archives. The function calls tarfile.extractall() without filter='data', and a PATH_MAX symlink resolution bug causes Keras's pre-extraction path filter, filter_safe_paths(), to be bypassed. Files can then be written outside the intended extraction directory, potentially leading to system compromise or malicious code execution.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.