CVE-2025-12060
Python vulnerability analysis and mitigation

Overview

The keras.utils.get_file API in Keras, when used with the extract=True option for tar archives, is vulnerable to a path traversal attack. This vulnerability (CVE-2025-12060) was disclosed in October 2025 and affects Keras versions prior to 3.12. The vulnerability is linked to the underlying Python tarfile weakness (CVE-2025-4517) (NVD).

Technical details

The vulnerability stems from the use of Python's tarfile.extractall function without the filter="data" feature. The utility fails to properly validate file paths during archive extraction, which could allow malicious tar archives containing special symlinks to be extracted. The vulnerability has been assigned a CVSS v4.0 Base Score of 8.9 (HIGH) with the vector string CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H (NVD).

Impact

A remote attacker can craft a malicious tar archive containing special symlinks, which when extracted, allows them to write arbitrary files to any location on the filesystem outside of the intended destination folder. This could potentially lead to system compromise through arbitrary file writes (NVD).

Mitigation and workarounds

Users should upgrade to Keras version 3.12 or later which implements the filter="data" option for tarfile extraction. Note that upgrading Python to a version that fixes CVE-2025-4517 (e.g. Python 3.13.4) alone is not sufficient - Keras must also be upgraded to version 3.12 or later for complete mitigation (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-12060HIGH8.9
  • PythonPython
  • py3-keras
NoYesOct 30, 2025
CVE-2025-6176HIGH7.5
  • PythonPython
  • python-scrapy
NoNoOct 31, 2025
CVE-2025-64168HIGH7.1
  • PythonPython
  • agno
NoYesOct 31, 2025
CVE-2025-63675MEDIUM6.9
  • PythonPython
  • cryptidy
NoNoOct 31, 2025
CVE-2025-50736LOW2
  • PythonPython
  • pdf2zh
NoNoOct 30, 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