Home » Database

AVID-2026-R0967

Description

Insecure temporary file in Tensorflow (CVE-2022-23563)

Details

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.

Reason for inclusion in AVID: CVE-2022-23563 describes a TOCTOU vulnerability in TensorFlow related to insecure temporary file creation using mktemp, which is a software flaw in a widely-used AI framework. This directly concerns AI pipelines (models/frameworks) and is in the software supply chain as a dependency used to build/run AI systems. The report provides clear vulnerability behavior, impact, and references, satisfying evidence requirements.

References

Affected or Relevant Artifacts

  • Developer: tensorflow
  • Deployer: tensorflow
  • Artifact Details:
TypeName
Systemtensorflow

Impact

AVID Taxonomy Categorization

  • Risk domains: Security
  • SEP subcategories: S0100: Software Vulnerability
  • Lifecycle stages: L06: Deployment

CVSS

Version3.1
Vector StringCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Base Score7.1
Base Severity🔴 High
Attack VectorLOCAL
Attack Complexity🟢 Low
Privileges Required🟢 Low
User InteractionNONE
ScopeUNCHANGED
Confidentiality Impact🔴 High
Integrity Impact🔴 High
Availability ImpactNONE

CWE

IDDescription
CWE-367CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

Other information

  • Report Type: Advisory
  • Credits:
  • Date Reported: 2022-02-04
  • Version: 0.3.3
  • AVID Entry