CVE-2022-23563 json
Insecure temporary file in Tensorflow
published 4y ago modified last mo. 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
Is CVE-2022-23563 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
0.11% chance of exploitation in the next 30 days, higher than 1% of all scored CVEs (FIRST EPSS, 2026-11-09).
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
References
-
github.com
/tensorflow/tensorflow/security/advisories/GHSA-wc4g-r73w-x8mm
web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-23563
advisory, web
-
github.com
/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2022-72.yaml
web
-
github.com
/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2022-127.yaml
web
-
github.com
/tensorflow/tensorflow
package
-
pypi.org
/project/tensorflow
package
-
github.com
/advisories/GHSA-wc4g-r73w-x8mm
advisory
Sources
- CVE List CVE-2022-23563
- GitHub Advisory GHSA-wc4g-r73w-x8mm
- NVD CVE-2022-23563
- OSV BIT-tensorflow-2022-23563
- OSV PYSEC-2022-127
- OSV PYSEC-2022-72
- OSV PYSEC-2026-3253
Fencer Intel 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.