# CVE-2021-35958: TensorFlow through 2.5.0 allows attackers to overwrite arbitrary files via a crafted archive when tf.keras.utils.getfile is used with extra…

- Severity: Critical 9.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.86%, higher than 79% of CVEs (2026-12-01)
- Published: 2021-06-30T00:12:53.000Z
- Modified: 2026-09-08T08:48:10.847Z
- Also known as: BIT-TENSORFLOW-2021-35958
- Weaknesses: CWE-22
- Assigned by: mitre

## Description

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- google tensorflow: up to 2.5.0
- tensorflow (Bitnami): before 2.5.1

## Every score

- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- NVD: CVSS:2.0 6.4 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://vuln.ryotak.me/advisories/52> (advisory, third-party-advisory)
- <https://github.com/tensorflow/tensorflow/blob/b8cad4c631096a34461ff8a07840d5f4d123ce32/tensorflow/python/keras/utils/data_utils.py#L137> (advisory, third-party-advisory)
- <https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall> (advisory, third-party-advisory)
- <https://keras.io/api/> (advisory, third-party-advisory)
- <https://github.com/tensorflow/tensorflow/blob/b8cad4c631096a34461ff8a07840d5f4d123ce32/tensorflow/python/keras/README.md> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-35958> (web)

## Sources

- CVE List: [CVE-2021-35958](https://www.cve.org/CVERecord?id=CVE-2021-35958), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-35958](https://nvd.nist.gov/vuln/detail/CVE-2021-35958), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-TENSORFLOW-2021-35958](https://osv.dev/vulnerability/BIT-TENSORFLOW-2021-35958), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-35958 · Whole record: https://cve.day/CVE-2021-35958.json · Rebuilt by cve.day 2026-11-25T22:58:02.382Z
