// For flags

CVE-2021-37685

Heap OOB in TensorFlow Lite

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`expand_dims.cc`](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/expand_dims.cc#L36-L50) contains a vulnerability which allows reading one element outside of bounds of heap allocated data. If `axis` is a large negative value (e.g., `-100000`), then after the first `if` it would still be negative. The check following the `if` statement will pass and the `for` loop would read one element before the start of `input_dims.data` (when `i = 0`). We have patched the issue in GitHub commit d94ffe08a65400f898241c0374e9edc6fa8ed257. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático. En las versiones afectadas, TFLite ["expand_dims.cc"] (https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/expand_dims.cc#L36-L50) contiene una vulnerabilidad que permite leer un elemento fuera de límites de los datos asignados a la pila. Si "axis" es un valor negativo grande (p. Ej., "-100000"), después del primer "if" seguirá siendo negativo. La comprobación que sigue a la instrucción "if" pasará y el ciclo "for" leerá un elemento antes del inicio de "input_dims.data" (cuando" i = 0"). Hemos solucionado el problema en GitHub commit d94ffe08a65400f898241c0374e9edc6fa8ed257. La corrección será incluida en TensorFlow versión 2.6.0. También seleccionaremos este commit en TensorFlow versión 2.5.1, TensorFlow versión 2.4.3 y TensorFlow versión 2.3.4,

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-07-29 CVE Reserved
  • 2021-08-12 CVE Published
  • 2023-03-08 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-125: Out-of-bounds Read
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.3.0 < 2.3.4
Search vendor "Google" for product "Tensorflow" and version " >= 2.3.0 < 2.3.4"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
>= 2.4.0 < 2.4.3
Search vendor "Google" for product "Tensorflow" and version " >= 2.4.0 < 2.4.3"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.5.0
Search vendor "Google" for product "Tensorflow" and version "2.5.0"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.6.0
Search vendor "Google" for product "Tensorflow" and version "2.6.0"
rc0
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.6.0
Search vendor "Google" for product "Tensorflow" and version "2.6.0"
rc1
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.6.0
Search vendor "Google" for product "Tensorflow" and version "2.6.0"
rc2
Affected