{"id":"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.","aliases":["BIT-tensorflow-2022-23563","GHSA-wc4g-r73w-x8mm","PYSEC-2022-127","PYSEC-2022-72"],"modified":"2026-04-10T04:44:48.123639Z","published":"2022-02-04T22:32:38Z","related":["openSUSE-SU-2024:12116-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23563.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-367"]},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"c256c071bb26e1e13b4666d1b3e229e110bc914a"},{"fixed":"2a0f59ecfe64d4e7750e406f00f783ff4bd34631"}],"database_specific":{"versions":[{"introduced":"2.7.0"},{"fixed":"2.7.1"}]}},{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"919f693420e35d00c8d0a42100837ae3718f7927"},{"fixed":"92a6bb06549e74a8bd8cdb8e28552496e5520007"}],"database_specific":{"versions":[{"introduced":"2.6.0"},{"fixed":"2.6.3"}]}},{"type":"GIT","repo":"https://github.com/tensorflow/tensorflow","events":[{"introduced":"0"},{"fixed":"959e9b2a0c06df945f9fb66bd367af8832ca0d28"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"2.5.3"}]}}],"versions":["0.5.0","0.6.0","v1.1.0-rc1","v1.1.0-rc2","v1.12.1","v1.6.0-rc1","v1.9.0-rc2","v2.5.0","v2.5.0-rc0","v2.5.0-rc1","v2.5.0-rc2","v2.5.0-rc3","v2.5.1","v2.5.2","v2.6.0","v2.6.1","v2.6.2","v2.7.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-23563.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"}]}