{"id":"CVE-2022-23563","aliases":["BIT-tensorflow-2022-23563","GHSA-wc4g-r73w-x8mm","PYSEC-2022-127","PYSEC-2022-72","PYSEC-2026-3253"],"url":"https://o3.security/vulnerability/CVE-2022-23563","summary":"Insecure temporary file in Tensorflow","details":"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":"2022-02-04T22:32:38Z","modified":"2026-08-12T03:51:49.143817539Z","cvss":{"score":7.1,"severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"},"epss":{"score":0.0011,"percentile":0.01501,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"tensorflow","fixedVersion":"2.5.3"},{"ecosystem":"PyPI","name":"tensorflow","fixedVersion":"2.6.3"},{"ecosystem":"PyPI","name":"tensorflow","fixedVersion":"2.7.1"},{"ecosystem":"PyPI","name":"tensorflow-cpu","fixedVersion":"2.5.3"},{"ecosystem":"PyPI","name":"tensorflow-cpu","fixedVersion":"2.6.3"},{"ecosystem":"PyPI","name":"tensorflow-cpu","fixedVersion":"2.7.1"},{"ecosystem":"PyPI","name":"tensorflow-gpu","fixedVersion":"2.5.3"},{"ecosystem":"PyPI","name":"tensorflow-gpu","fixedVersion":"2.6.3"},{"ecosystem":"PyPI","name":"tensorflow-gpu","fixedVersion":"2.7.1"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23563.json"},{"type":"ADVISORY","url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-wc4g-r73w-x8mm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23563"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:49.143817539Z"}}