CVE-2021-41202

Overflow/crash in `tf.range`

MEDIUM
5.5
CVSS Score
Published: November 5, 2021 at 09:45 PM UTC
Updated: June 17, 2026 at 04:08 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 open source platform for machine learning. In affected versions while calculating the size of the output within the `tf.range` kernel, there is a conditional statement of type `int64 = condition ? int64 : double`. Due to C++ implicit conversion rules, both branches of the condition will be cast to `double` and the result would be truncated before the assignment. This result in overflows. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.

Affected

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

2.4.0 ≤ v < 2.4.42.5.0 ≤ v < 2.5.22.6.0 ≤ v < 2.6.12.7.0 rc02.7.0 rc1
Affected range stops below 2.4.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.5.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.6.1, so it looks safe — our inference, not a vendor statement
v < 2.4.4v < 2.5.2v < 2.6.1
Affected range stops below 2.4.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.5.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.6.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. 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-681

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