CVE-2022-23563
Insecure temporary file in Tensorflow
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
Description
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVDNVD · Modified | 3.1 | Medium6.3 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N |
- EPSS (exploitation in 30 days)
- 0.11% · top 99% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.1.
Weakness
Affected products
- affected >= 2.7.0, < 2.7.1
- affected >= 2.6.0, < 2.6.3
- affected < 2.5.3
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPItensorflowGHSA-wc4g-r73w-x8mm (opens in a new tab)
- PyPItensorflow-cpuGHSA-wc4g-r73w-x8mm (opens in a new tab)
- PyPItensorflow-gpuGHSA-wc4g-r73w-x8mm (opens in a new tab)
References (1)
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-wc4g-r73w-x8mm (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-wc4g-r73w-x8mm (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2022-23563)Record last updated .