CVE-2022-23563: TensorFlow - Race Condition
- Cve: CVE-2022-23563
- Name: TensorFlow - Race Condition
- 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.
- Impact: Local attackers can exploit race conditions to access or manipulate temporary files, potentially leading to privilege escalation or code execution.
- Remediation: Upgrade to the latest version where `mktemp` has been replaced with `mkstemp`/`mkdtemp` for safer temporary file handling.
- Vulnerability type: race_condition
- Vulnerability impact: privilege_escalation, information_disclosure
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 6.3
- Cvss vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
- Epss score: 0.0011
- Epss percentile: 0.01305
- Assignee: [email protected]
- Published at: 2022-02-04T23:15:13Z
- Age in days: 1754
- Modified at: 2026-06-17T04:30:21Z
- References total: 1
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-23563
- Nvd status: modified
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-367 | Time-of-check Time-of-use (TOCTOU) Race Condition |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/tensorflow/tensorflow/security/advisories/GHSA-wc4g-r73w-x8mm | nvd | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| google:tensorflow | = 2.7.0; >= 2.6.0, <= 2.6.2; <= 2.5.2 | no | nvd | /v1/products/google/tensorflow |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| tensorflow/tensorflow | package, security_advisory | yes | /v1/repositories/tensorflow/tensorflow |
Index
- Repositories: 352
- Repositories high signal: 135
- Packages: 3
Exploitation
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts