CVE-2021-37677: TensorFlow - Denial of Service
- Cve: CVE-2021-37677
- Name: TensorFlow - Denial of Service
- Description: TensorFlow is an end-to-end open source platform for machine learning. In affected versions the shape inference code for `tf.raw_ops.Dequantize` has a vulnerability that could trigger a denial of service via a segfault if an attacker provides invalid arguments. The shape inference [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/ops/array_ops.cc#L2999-L3014) uses `axis` to select between two different values for `minmax_rank` which is then used to retrieve tensor dimensions. However, code assumes that `axis` can be either `-1` or a value greater than `-1`, with no validation for the other values. We have patched the issue in GitHub commit da857cfa0fde8f79ad0afdbc94e88b5d4bbec764. 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 a denial of service by triggering a segfault through invalid arguments, disrupting service availability.
- Remediation: Update to TensorFlow 2.6.0 or apply the patch in commit da857cfa0fde8f79ad0afdbc94e88b5d4bbec764 in affected versions 2.5.1, 2.4.3, and 2.3.4.
- Vulnerability impact: denial_of_service
- 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:N/I:N/A:H
- Epss score: 0.00148
- Epss percentile: 0.03941
- Assignee: [email protected]
- Published at: 2021-08-12T23:15:08Z
- Age in days: 1930
- Modified at: 2026-06-17T04:00:57Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-37677
- 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: vulnerability type, requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-20 | Improper Input Validation |
| CWE-1284 | Improper Validation of Specified Quantity in Input |
References
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| 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.4 | no | nvd | /v1/products/google/tensorflow |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| tensorflow/tensorflow | commit, package, security_advisory | yes | /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