Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.1
CVE-2021-35958: TensorFlow allows attackers to overwrite files via crafted archives
CVE-2021-35958 · published 5 years ago
Summary
TensorFlow versions up to 2.5.0 can be exploited by attackers to overwrite arbitrary files on a system. This is a concern because it allows an attacker to make unauthorized changes to your system. To mitigate this, ensure you only use trusted archives with TensorFlow's get_file function when the extract parameter is set to True.
What to do
The CVE record does not list a fixed version. Check the vendor's site or the advisory links below - a fix may already be released.
Affected software
| Vendor | Product | Affected versions |
|---|---|---|
| tensorflow |
<= 2.5.0 cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
Original advisory text
TensorFlow through 2.5.0 allows attackers to overwrite arbitrary files via a crafted archive when tf.keras.utils.get_file is used with extract=True. NOTE: the vendor's position is that tf.keras.uti...
TensorFlow through 2.5.0 allows attackers to overwrite arbitrary files via a crafted archive when tf.keras.utils.get_file is used with extract=True. NOTE: the vendor's position is that tf.keras.utils.get_file is not intended for untrusted archives
References
- https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall Third Party Advisory
- https://github.com/tensorflow/tensorflow/blob/b8cad4c631096a34461ff8a07840d5f4d1... Third Party Advisory
- https://github.com/tensorflow/tensorflow/blob/b8cad4c631096a34461ff8a07840d5f4d1... Third Party Advisory
- https://vuln.ryotak.me/advisories/52 Third Party Advisory
- https://keras.io/api/ Third Party Advisory
Internet-facing
14 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically (estimated)
- Gives an attacker partial control (estimated)
Type
CWE-22Path Traversal
Timeline
Published30 Jun 2021
Updated4 Nov 2026
First seen9 Jul 2026
Track software like this
Free during beta