Loading HuntDB...

CVE-2022-23563

HIGH
Published 2022-02-04T22:32:38.000Z
Actions:

Expert Analysis

Professional remediation guidance

Get tailored security recommendations from our analyst team for CVE-2022-23563. We'll provide specific mitigation strategies based on your environment and risk profile.

CVSS Score

V3.1
7.1
/10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Base Score Metrics
Exploitability: N/A Impact: N/A

EPSS Score

v2025.03.14
0.000
probability
of exploitation in the wild

There is a 0.0% chance that this vulnerability will be exploited in the wild within the next 30 days.

Updated: 2025-06-25
Exploit Probability
Percentile: 0.016
Higher than 1.6% of all CVEs

Attack Vector Metrics

Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED

Impact Metrics

Confidentiality
HIGH
Integrity
HIGH
Availability
NONE

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.

Available Exploits

No exploits available for this CVE.

Related News

No news articles found for this CVE.

Affected Products

GitHub Security Advisories

Community-driven vulnerability intelligence from GitHub

✓ GitHub Reviewed HIGH

Insecure temporary file in Tensorflow

GHSA-wc4g-r73w-x8mm

Advisory Details

### Impact 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. ### Patches We have patched the issue in several commits, replacing `mktemp` with the safer `mkstemp`/`mkdtemp` functions, according to the usage pattern. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range. ### For more information Please consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions. ### Attribution This vulnerability has been reported on huntr.dev for one scenario and discovered via variant analysis on other instances.

Affected Packages

PyPI tensorflow
ECOSYSTEM: ≥0 <2.5.3
PyPI tensorflow
ECOSYSTEM: ≥2.6.0 <2.6.3
PyPI tensorflow
ECOSYSTEM: ≥2.7.0 <2.7.1
PyPI tensorflow-cpu
ECOSYSTEM: ≥0 <2.5.3
PyPI tensorflow-cpu
ECOSYSTEM: ≥2.6.0 <2.6.3
PyPI tensorflow-cpu
ECOSYSTEM: ≥2.7.0 <2.7.1
PyPI tensorflow-gpu
ECOSYSTEM: ≥0 <2.5.3
PyPI tensorflow-gpu
ECOSYSTEM: ≥2.6.0 <2.6.3
PyPI tensorflow-gpu
ECOSYSTEM: ≥2.7.0 <2.7.1

CVSS Scoring

CVSS Score

7.5

CVSS Vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Advisory provided by GitHub Security Advisory Database. Published: February 9, 2022, Modified: November 13, 2024

References

Published: 2022-02-04T22:32:38.000Z
Last Modified: 2025-04-23T19:07:51.891Z
Copied to clipboard!