CVE-2022-23563

Insecure temporary file in Tensorflow

MEDIUM
6.3
CVSS Score
Published: February 4, 2022 at 10:32 PM UTC
Updated: June 17, 2026 at 04:30 AM UTC
2 products affected across 2 vendorsTensorflowTensorFlow

Using tensorflow by tensorflow?

Get instant alerts when new vulnerabilities affect tensorflow - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.3
Exploit prediction
EPSS 0.1%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≤ 2.5.22.6.0 ≤ v ≤ 2.6.22.7.0
v < 2.5.3v < 2.6.3v < 2.7.1
Affected range stops below 2.5.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.6.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.7.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-367

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card