SecurityContext

CVE-2021-37687: TensorFlow - Out of Bounds Read

  • Cve: CVE-2021-37687
  • Name: TensorFlow - Out of Bounds Read
  • Description: TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
  • Impact: Attackers can read arbitrary data from heap memory, potentially leading to information disclosure or memory corruption.
  • Remediation: Update to TensorFlow 2.6.0 or apply the patches from commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d, including cherry-picks for supported versions.
  • Vulnerability type: out_of_bounds_rw
  • Vulnerability impact: information_disclosure
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.5
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
  • Epss score: 0.00188
  • Epss percentile: 0.08301
  • Assignee: [email protected]
  • Published at: 2021-08-12T23:15:08Z
  • Age in days: 1930
  • Modified at: 2026-06-17T04:00:59Z
  • Patch available: yes
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-37687
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-125Out-of-bounds Read

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/tensorflow/tensorflow/commit/bb6a0383ed553c286f87ca88c207f6774d5c4a8fPatch, Third Party Advisory
https://github.com/tensorflow/tensorflow/commit/eb921122119a6b6e470ee98b89e65d721663179dThird Party Advisory
https://github.com/tensorflow/tensorflow/security/advisories/GHSA-jwf9-w5xm-f437Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
google:tensorflow= 2.6.0 rc0; = 2.6.0 rc1; = 2.6.0 rc2; = 2.5.0; >= 2.4.0, < 2.4.3; >= 2.3.0, < 2.3.4nonvd/v1/products/google/tensorflow

Projects

RepositoryLink kindsIndexedUrl
tensorflow/tensorflowcommit, package, security_advisoryyes/v1/repositories/tensorflow/tensorflow

Index

  • Repositories: 340
  • Repositories high signal: 133
  • Packages: 3

Exploitation

  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts