Skip to content
Fencer Vulns
high 7.1

CVE-2022-23563 json

Insecure temporary file in Tensorflow

published 2022-02-04 4 y ago modified 2026-09-10 59 d ago also BIT-tensorflow-2022-23563 , EUVD-2022-0311 , GHSA-wc4g-r73w-x8mm , PYSEC-2022-127 , PYSEC-2022-72 , PYSEC-2026-3253

cvss
7.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.1%
EPSS 0.1% chance of exploitation in 30 days, percentile 1%
public exploits
0
none known

Summary

Tensorflow is an Open Source Machine Learning Framework. In multiple places, TensorFlow uses `tempfile.mktemp` to create temporary files. While this is acceptable in testing, in utilities and libraries it is dangerous as a different process can create the file between the check for the filename in `mktemp` and the actual creation of the file by a subsequent operation (a TOC/TOU type of weakness). In several instances, TensorFlow was supposed to actually create a temporary directory instead of a file. This logic bug is hidden away by the `mktemp` function usage. We have patched the issue in several commits, replacing `mktemp` with the safer `mkstemp`/`mkdtemp` functions, according to the usage pattern. Users are advised to upgrade as soon as possible.

Patch / fix

  • pypi tensorflow 2.5.3, 2.6.3, 2.7.1
  • pypi tensorflow-cpu 2.5.3, 2.6.3, 2.7.1
  • pypi tensorflow-gpu 2.5.3, 2.6.3, 2.7.1
  • bitnami tensorflow 2.5.3, 2.6.3, 2.7.1

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
18 mo ago

Exploit prediction

0.11% chance of exploitation in the next 30 days, higher than 1% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
GitHub 3.1 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD 3.1 6.3 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD 2.0 3.3 AV:L/AC:M/Au:N/C:P/I:P/A:N
OSV 3.1 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected packages

ecosystem package affected fixed in
pypi tensorflow
<2.5.3
>=2.6.0, <2.6.3
>=2.7.0, <2.7.1
2.5.3
2.6.3
2.7.1
pypi tensorflow-cpu
<2.5.3
>=2.6.0, <2.6.3
>=2.7.0, <2.7.1
2.5.3
2.6.3
2.7.1
pypi tensorflow-gpu
<2.5.3
>=2.6.0, <2.6.3
>=2.7.0, <2.7.1
2.5.3
2.6.3
2.7.1
bitnami tensorflow
<2.5.3
>=2.6.0, <2.6.3
>=2.7.0, <2.7.1
2.5.3
2.6.3
2.7.1

Affected products

  • tensorflow tensorflow

Classification

Weakness
  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
  • CWE-668 Exposure of Resource to Wrong Sphere

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.