CVE-2021-37689: TensorFlow - Null Pointer Dereference
- Cve: CVE-2021-37689
- Name: TensorFlow - Null Pointer Dereference
- Description: TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service. This is caused by the MLIR optimization of `L2NormalizeReduceAxis` operator. The [implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/compiler/mlir/lite/transforms/optimize.cc#L67-L70) unconditionally dereferences a pointer to an iterator to a vector without checking that the vector has elements. We have patched the issue in GitHub commit d6b57f461b39fd1aa8c1b870f1b974aac3554955. 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 crash and denial of service by crafting malicious TFLite models, disrupting service availability.
- Remediation: Update to TensorFlow 2.6.0 or apply the patch to versions 2.5.1, 2.4.3, and 2.3.4.
- Vulnerability type: null_pointer_dereference
- 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.00165
- Epss percentile: 0.0562
- Assignee: [email protected]
- Published at: 2021-08-12T22:15:09Z
- Age in days: 1930
- 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-37689
- 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
| Id | Name |
|---|---|
| CWE-476 | NULL Pointer Dereference |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/tensorflow/tensorflow/commit/d6b57f461b39fd1aa8c1b870f1b974aac3554955 | nvd | Patch, Third Party Advisory |
| https://github.com/tensorflow/tensorflow/security/advisories/GHSA-wf5p-c75w-w3wh | nvd | Third Party Advisory |
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