CVE-2021-41202
Overflow/crash in `tf.range`
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | Medium5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 0.21% · top 89% of all CVEs (6 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.5.
Weakness
Affected products
- affected >= 2.6.0, < 2.6.1
- affected >= 2.5.0, < 2.5.2
- affected < 2.4.4
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPItensorflowGHSA-xrqm-fpgr-6hhx (opens in a new tab)
- PyPItensorflow-cpuGHSA-xrqm-fpgr-6hhx (opens in a new tab)
- PyPItensorflow-gpuGHSA-xrqm-fpgr-6hhx (opens in a new tab)
References (5)
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrqm-fpgr-6hhx (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/tensorflow/tensorflow/issues/46889 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tensorflow/tensorflow/issues/46912 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tensorflow/tensorflow/commit/1b0e0ec27e7895b9985076eab32445026ae5ca94 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tensorflow/tensorflow/commit/6d94002a09711d297dbba90390d5482b76113899 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-xrqm-fpgr-6hhx (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2021-41202)Record last updated .