// For flags

CVE-2022-23563

Insecure temporary file in Tensorflow

Severity Score

6.3
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Tensorflow es un Marco de Aprendizaje Automático de Código Abierto. En varios lugares, TensorFlow usa "tempfile.mktemp" para crear archivos temporales. Mientras que esto es aceptable en las pruebas, en las utilidades y bibliotecas es peligroso ya que un proceso diferente puede crear el archivo entre la comprobación del nombre del archivo en "mktemp" y la creación real del archivo por una operación posterior (una debilidad del tipo TOC/TOU). En varios casos, se supone que TensorFlow debería crear un directorio temporal en lugar de un archivo. Este error lógico está oculto por el uso de la función "mktemp". Hemos parcheado el problema en varios commits, sustituyendo "mktemp" por las funciones más seguras "mkstemp"/"mkdtemp", de acuerdo con el patrón de uso. Se recomienda a usuarios que actualicen lo antes posible

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Local
Attack Complexity
Medium
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-01-19 CVE Reserved
  • 2022-02-04 CVE Published
  • 2023-08-28 EPSS Updated
  • 2024-08-03 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
<= 2.5.2
Search vendor "Google" for product "Tensorflow" and version " <= 2.5.2"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
>= 2.6.0 <= 2.6.2
Search vendor "Google" for product "Tensorflow" and version " >= 2.6.0 <= 2.6.2"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.7.0
Search vendor "Google" for product "Tensorflow" and version "2.7.0"
-
Affected