CVE-2021-37686

Infinite loop in TensorFlow Lite

MEDIUM
5.5
CVSS Score
Published: August 12, 2021 at 09:55 PM UTC
Updated: June 17, 2026 at 04:00 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
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

TensorFlow is an end-to-end open source platform for machine learning. In affected versions the strided slice implementation in TFLite has a logic bug which can allow an attacker to trigger an infinite loop. This arises from newly introduced support for [ellipsis in axis definition](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/strided_slice.cc#L103-L122). An attacker can craft a model such that `ellipsis_end_idx` is smaller than `i` (e.g., always negative). In this case, the inner loop does not increase `i` and the `continue` statement causes execution to skip over the preincrement at the end of the outer loop. We have patched the issue in GitHub commit dfa22b348b70bb89d6d6ec0ff53973bacb4f4695. TensorFlow 2.6.0 is the only affected version.

Affected

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

2.3.0 ≤ v < 2.3.42.4.0 ≤ v < 2.4.32.5.02.6.0 rc02.6.0 rc12.6.0 rc2
Affected range stops below 2.3.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.4.3, so it looks safe — our inference, not a vendor statement
v < 2.6.0rc2
Affected range stops below 2.6.0rc2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

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

Quick Info

StatusMODIFIED
CWE
CWE-835

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