Security mailing lists by PureSourceCode

CVE-2022-23563

MEDIUM 6.3CVSS 3.1

Insecure temporary file in Tensorflow

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.

Published
4 Feb 2022
Last modified
13 Jul 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-367CWE-668
Also known as
BIT-tensorflow-2022-23563GHSA-wc4g-r73w-x8mmPYSEC-2022-127PYSEC-2022-72PYSEC-2026-3253
Sources
NVDJSONOSV GHSA-wc4g-r73w-x8mmJSONOSV PYSEC-2022-127JSONOSV PYSEC-2022-72JSONOSV PYSEC-2026-3253JSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
OSV PyPA CVSS 4.0 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
OSV GitHub CVSS 3.1 HIGH 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
OSV PyPA CVSS 3.1 HIGH 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 6.3 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 LOW 3.3 AV:L/AC:M/Au:N/C:P/I:P/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD google tensorflow
cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*
<= 2.5.2
NVD google tensorflow
cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*
>= 2.6.0, <= 2.6.2
NVD google tensorflow
cpe:2.3:a:google:tensorflow:2.7.0:*:*:*:*:*:*:*
= 2.7.0
OSV PyPI tensorflow < 2.5.3 2.5.3
OSV PyPI tensorflow >= 2.6.0, < 2.6.3 2.6.3
OSV PyPI tensorflow >= 2.7.0, < 2.7.1 2.7.1
OSV PyPI tensorflow-cpu < 2.5.3 2.5.3
OSV PyPI tensorflow-cpu >= 2.6.0, < 2.6.3 2.6.3
OSV PyPI tensorflow-cpu >= 2.7.0, < 2.7.1 2.7.1
OSV PyPI tensorflow-gpu < 2.5.3 2.5.3
OSV PyPI tensorflow-gpu >= 2.6.0, < 2.6.3 2.6.3
OSV PyPI tensorflow-gpu >= 2.7.0, < 2.7.1 2.7.1
OSV PyPI tensorflow-gpu < 2.5.3; >= 2.6.0, < 2.6.3 2.5.3, 2.6.3
OSV PyPI tensorflow-cpu < 2.5.3; >= 2.6.0, < 2.6.3 2.5.3, 2.6.3
OSV 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

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 4 Feb 2022)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Jul 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 4 Feb 2022)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 4 Feb 2022)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Feb 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.