CVE-2021-41221: TensorFlow - Buffer Overflow
- Cve: CVE-2021-41221
- Name: TensorFlow - Buffer Overflow
- Description: TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for the `Cudnn*` operations in TensorFlow can be tricked into accessing invalid memory, via a heap buffer overflow. This occurs because the ranks of the `input`, `input_h` and `input_c` parameters are not validated, but code assumes they have certain values. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
- Impact: Attackers can access invalid memory, potentially leading to information disclosure or application crashes.
- Remediation: Update to TensorFlow 2.7.0 or cherry-pick the fix on versions 2.6.1, 2.5.2, and 2.4.4.
- Vulnerability type: buffer_overflow
- Vulnerability impact: information_disclosure, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.8
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00221
- Epss percentile: 0.12565
- Assignee: [email protected]
- Published at: 2021-11-05T23:15:08Z
- Age in days: 1845
- Modified at: 2026-06-17T04:08:07Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-41221
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-120 | Buffer Copy without Checking Size of Input |
| CWE-787 | Out-of-bounds Write |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cqv6-3phm-hcwx | nvd | 2021-11-05 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/tensorflow/tensorflow/commit/af5fcebb37c8b5d71c237f4e59c6477015c78ce6 | nvd | Patch, Third Party Advisory |
| https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cqv6-3phm-hcwx | nvd | Exploit, Patch, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| google:tensorflow | = 2.7.0 rc0; = 2.7.0 rc1; >= 2.6.0, < 2.6.1; >= 2.5.0, < 2.5.2; >= 2.4.0, < 2.4.4 | no | nvd | /v1/products/google/tensorflow |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| tensorflow/tensorflow | commit, fix, package, security_advisory | yes | /v1/repositories/tensorflow/tensorflow |
Index
- Repositories: 347
- Repositories high signal: 134
- Packages: 3
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2021-11-05
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts