AVID-2026-R0844
Description
Heap OOB and CHECK fail in ResourceGather in TensorFlow (CVE-2021-37654)
Details
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a crash via a CHECK-fail in debug builds of TensorFlow using tf.raw_ops.ResourceGather or a read from outside the bounds of heap allocated data in the same API in a release build. The implementation does not check that the batch_dims value that the user supplies is less than the rank of the input tensor. Since the implementation uses several for loops over the dimensions of tensor, this results in reading data from outside the bounds of heap allocated buffer backing the tensor. We have patched the issue in GitHub commit bc9c546ce7015c57c2f15c168b3d9201de679a1d. 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.
Reason for inclusion in AVID: The CVE describes a software vulnerability in TensorFlow (ResourceGather) causing a heap out-of-bounds read and a CHECK failure. TensorFlow is a core AI framework used across ML pipelines to build, train, deploy, and run AI systems. This represents a software supply-chain risk within AI software stacks since a widely used dependency can be exploited to crash or potentially compromise a system. The report provides concrete details (affected versions, patch info, CVSS v3.1 metrics, and a reproducible condition), satisfying evidence for inclusion as a security vulnerability in the AI supply chain.
References
- NVD entry
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-2r8p-fg3c-wcj4
- https://github.com/tensorflow/tensorflow/commit/bc9c546ce7015c57c2f15c168b3d9201de679a1d
Affected or Relevant Artifacts
- Developer: tensorflow
- Deployer: tensorflow
- Artifact Details:
| Type | Name |
|---|---|
| System | tensorflow |
Impact
AVID Taxonomy Categorization
- Risk domains: Security
- SEP subcategories: S0100: Software Vulnerability
- Lifecycle stages: L06: Deployment
CVSS
| Version | 3.1 |
| Vector String | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H |
| Base Score | 7.3 |
| Base Severity | 🔴 High |
| Attack Vector | LOCAL |
| Attack Complexity | 🟢 Low |
| Privileges Required | 🟢 Low |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | 🔴 High |
| Integrity Impact | 🟢 Low |
| Availability Impact | 🔴 High |
CWE
| ID | Description |
|---|---|
| CWE-125 | CWE-125: Out-of-bounds Read |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2021-08-12
- Version: 0.3.3
- AVID Entry