SecurityContext

CVE-2021-37690: TensorFlow - Use After Free

  • Cve: CVE-2021-37690
  • Name: TensorFlow - Use After Free
  • Description: TensorFlow is an end-to-end open source platform for machine learning. In affected versions when running shape functions, some functions (such as `MutableHashTableShape`) produce extra output information in the form of a `ShapeAndType` struct. The shapes embedded in this struct are owned by an inference context that is cleaned up almost immediately; if the upstream code attempts to access this shape information, it can trigger a segfault. `ShapeRefiner` is mitigating this for normal output shapes by cloning them (and thus putting the newly created shape under ownership of an inference context that will not die), but we were not doing the same for shapes and types. This commit fixes that by doing similar logic on output shapes and types. We have patched the issue in GitHub commit ee119d4a498979525046fba1c3dd3f13a039fbb1. 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 cause segmentation faults or crashes, potentially leading to denial of service or arbitrary code execution.
  • Remediation: Update to TensorFlow 2.6.0 or apply the patch to affected versions 2.5.1, 2.4.3, and 2.3.4.
  • Vulnerability type: use_after_free
  • Vulnerability impact: denial_of_service, remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 6.6
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
  • Epss score: 0.00163
  • Epss percentile: 0.05403
  • Assignee: [email protected]
  • Published at: 2021-08-13T00:15:07Z
  • Age in days: 1929
  • Modified at: 2026-06-17T04:00:59Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-37690
  • 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-416Use After Free

References

UrlSourceTags
https://github.com/tensorflow/tensorflow/commit/ee119d4a498979525046fba1c3dd3f13a039fbb1nvdPatch, Third Party Advisory
https://github.com/tensorflow/tensorflow/security/advisories/GHSA-3hxh-8cp2-g4hgnvdThird 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