CVE-2021-35958
TensorFlow vulnerability analysis and mitigation

Overview

TensorFlow through 2.5.0 contains a vulnerability in the tf.keras.utils.getfile function when used with extract=True parameter. This function allows attackers to overwrite arbitrary files via a crafted archive. The vulnerability was discovered and disclosed on June 29, 2021. However, this vulnerability is disputed as the vendor's position is that tf.keras.utils.getfile is not intended for untrusted archives (MITRE, NVD).

Technical details

The vulnerability exists in the get_file function of TensorFlow's Keras utility module when the extract parameter is set to True. The function fails to properly validate archive contents before extraction, which could allow path traversal attacks through crafted archive files (RyotaK).

Impact

If exploited, this vulnerability could allow an attacker to overwrite arbitrary files on the system through a specially crafted archive file when processed by the tf.keras.utils.get_file function with extract=True parameter (RyotaK).

Mitigation and workarounds

The recommended mitigation is to avoid using tf.keras.utils.get_file with extract=True parameter on untrusted archive files. Security-conscious users should verify archive contents before extraction (RyotaK).

Additional resources


SourceThis report was generated using AI

Related TensorFlow vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-0649HIGH8.9
  • TensorFlowTensorFlow
  • cpe:2.3:a:google:tensorflow
NoNoMay 06, 2025
CVE-2025-55559HIGH7.5
  • TensorFlowTensorFlow
  • tensorflow
NoNoSep 25, 2025
CVE-2025-55556MEDIUM6.5
  • TensorFlowTensorFlow
  • cpe:2.3:a:google:tensorflow
NoNoSep 25, 2025
CVE-2024-9681MEDIUM6.5
  • MySQLMySQL
  • curl-libs
NoYesNov 06, 2024
CVE-2024-11053LOW3.4
  • MySQLMySQL
  • mysql:8.0::mysql-test
NoYesDec 11, 2024

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