CVE-2025-12060
Python vulnerability analysis and mitigation

Overview

CVE-2025-12060 affects the keras.utils.get_file API in Keras when used with the extract=True option for tar archives. The vulnerability was discovered and disclosed on October 30, 2025, impacting Keras versions prior to 3.12. This path traversal vulnerability stems from the use of Python's tarfile.extractall function without the filter="data" feature, and is linked to the underlying Python tarfile weakness (CVE-2025-4517) (NVD).

Technical details

The vulnerability exists due to improper handling of tar archive extraction in the keras.utils.get_file API. When the extract=True option is used, the function utilizes Python's tarfile.extractall without implementing the necessary filter="data" security feature. The severity is rated as HIGH with a CVSS v4.0 Base Score of 8.9, indicating significant potential impact. The vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) (NVD).

Impact

A remote attacker can exploit this vulnerability by crafting a malicious tar archive containing special symlinks. When such an archive is extracted, it allows the attacker to write arbitrary files to any location on the filesystem outside of the intended destination folder. This could potentially lead to unauthorized file system access and modification (NVD).

Mitigation and workarounds

The vulnerability has been fixed in Keras version 3.12. Users are advised to upgrade to this version or later. It's important to note that simply upgrading Python to a version that fixes CVE-2025-4517 (e.g., Python 3.13.4) is not sufficient - Keras must also be upgraded to version 3.12 or later. The fix implements the filter="data" option for TarFile.extractall to prevent path traversal attacks (Keras PR).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 11, 2025
CVE-2025-13780CRITICAL9.1
  • PythonPython
  • pgadmin4
NoYesDec 11, 2025
CVE-2025-67644HIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 11, 2025
CVE-2025-67720MEDIUM6.5
  • PythonPython
  • pyrofork
NoYesDec 11, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management