{"cve":"CVE-2021-37686","nvd":{"published":"2021-08-12T22:15:08.967","modified":"2026-06-17T04:00:59.033","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5},"cwes":["CWE-835"],"references":["https://github.com/tensorflow/tensorflow/commit/dfa22b348b70bb89d6d6ec0ff53973bacb4f4695","https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mhhc-q96p-mfm9","https://github.com/tensorflow/tensorflow/commit/dfa22b348b70bb89d6d6ec0ff53973bacb4f4695","https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mhhc-q96p-mfm9"],"products":["google:tensorflow"],"source":"nvd","synced_at":"2026-10-19T21:21:57.125947417+00:00"},"epss":{"cve":"CVE-2021-37686","score":0.00173,"percentile":0.06705,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-mhhc-q96p-mfm9","url":"https://osv.dev/vulnerability/GHSA-mhhc-q96p-mfm9","summary":"Infinite loop in TFLite","modified":"2026-07-08T06:28:29.862814155Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.6.0rc0 <2.6.0rc2"],"fixed":["2.6.0rc2"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.6.0rc0 <2.6.0rc2"],"fixed":["2.6.0rc2"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.6.0rc0 <2.6.0rc2"],"fixed":["2.6.0rc2"]}]},{"id":"PYSEC-2021-308","url":"https://osv.dev/vulnerability/PYSEC-2021-308","summary":"","modified":"2023-12-06T01:01:24.348429Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.3.0 <2.3.4",">=2.4.0 <2.4.3"],"fixed":["2.3.4","2.4.3"]}]},{"id":"PYSEC-2021-599","url":"https://osv.dev/vulnerability/PYSEC-2021-599","summary":"","modified":"2023-12-06T01:01:24.348429Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.3.0 <2.3.4",">=2.4.0 <2.4.3"],"fixed":["2.3.4","2.4.3"]}]},{"id":"PYSEC-2021-797","url":"https://osv.dev/vulnerability/PYSEC-2021-797","summary":"","modified":"2023-12-06T01:01:24.348429Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.3.0 <2.3.4",">=2.4.0 <2.4.3"],"fixed":["2.3.4","2.4.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}