CVE-2021-37686
MEDIUM 5.5CVSS 3.1Infinite loop in TFLite
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. 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.
- Published
- 12 Aug 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-835
- Also known as
- BIT-tensorflow-2021-37686GHSA-mhhc-q96p-mfm9PYSEC-2021-308PYSEC-2021-599PYSEC-2021-797
- Sources
- NVDJSONOSV GHSA-mhhc-q96p-mfm9JSONOSV PYSEC-2021-308JSONOSV PYSEC-2021-599JSONOSV PYSEC-2021-797JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 2.1 | AV:L/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
>= 2.3.0, < 2.3.4 | 2.3.4 | |
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
>= 2.4.0, < 2.4.3 | 2.4.3 | |
| NVD | tensorflowcpe:2.3:a:google:tensorflow:2.5.0:*:*:*:*:*:*:* |
= 2.5.0 | ||
| NVD | tensorflowcpe:2.3:a:google:tensorflow:2.6.0:rc0:*:*:*:*:*:* |
= 2.6.0 | ||
| NVD | tensorflowcpe:2.3:a:google:tensorflow:2.6.0:rc1:*:*:*:*:*:* |
= 2.6.0 | ||
| NVD | tensorflowcpe:2.3:a:google:tensorflow:2.6.0:rc2:*:*:*:*:*:* |
= 2.6.0 | ||
| OSV | PyPI | tensorflow | >= 2.6.0rc0, < 2.6.0rc2 | 2.6.0rc2 |
| OSV | PyPI | tensorflow-cpu | >= 2.6.0rc0, < 2.6.0rc2 | 2.6.0rc2 |
| OSV | PyPI | tensorflow-gpu | >= 2.6.0rc0, < 2.6.0rc2 | 2.6.0rc2 |
| OSV | PyPI | tensorflow | >= 2.3.0, < 2.3.4; >= 2.4.0, < 2.4.3 | 2.3.4, 2.4.3 |
| OSV | PyPI | tensorflow-cpu | >= 2.3.0, < 2.3.4; >= 2.4.0, < 2.4.3 | 2.3.4, 2.4.3 |
| OSV | PyPI | tensorflow-gpu | >= 2.3.0, < 2.3.4; >= 2.4.0, < 2.4.3 | 2.3.4, 2.4.3 |
References
- https://github.com/tensorflow/tensorflow/commit/dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mhhc-q96p-mfm9 · Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2021-37686 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-599.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-797.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-308.yaml · WEB
- https://github.com/tensorflow/tensorflow · PACKAGE
- https://github.com/tensorflow/tensorflow/releases/tag/v2.3.4 · WEB
- https://github.com/tensorflow/tensorflow/releases/tag/v2.4.3 · WEB
- https://github.com/tensorflow/tensorflow/releases/tag/v2.5.1 · WEB
- https://github.com/tensorflow/tensorflow/releases/tag/v2.6.0 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 12 Aug 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 12 Aug 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 12 Aug 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 12 Aug 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Aug 2021)