CVE-2022-41894: TensorFlow - Buffer Overflow
- Cve: CVE-2022-41894
- Name: TensorFlow - Buffer Overflow
- Description: TensorFlow is an open source platform for machine learning. The reference kernel of the `CONV_3D_TRANSPOSE` TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result. Instead of `data_ptr += num_channels;` it should be `data_ptr += output_num_channels;` as if the number of input channels is different than the number of output channels, the wrong result will be returned and a buffer overflow will occur if num_channels > output_num_channels. An attacker can craft a model with a specific number of input channels. It is then possible to write specific values through the bias of the layer outside the bounds of the buffer. This attack only works if the reference kernel resolver is used in the interpreter. We have patched the issue in GitHub commit 72c0bdcb25305b0b36842d746cc61d72658d2941. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.
- Impact: Attackers can write outside buffer bounds, potentially leading to arbitrary code execution or memory corruption.
- Remediation: Update to TensorFlow 2.11 or apply the patch from commit 72c0bdcb25305b0b36842d746cc61d72658d2941 in earlier versions.
- Vulnerability type: buffer_overflow
- Vulnerability impact: data_tampering, remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00761
- Epss percentile: 0.56247
- Assignee: [email protected]
- Published at: 2022-11-18T22:15:17Z
- Age in days: 1467
- Modified at: 2026-06-17T05:04:00Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-41894
- 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 |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/tensorflow/tensorflow/security/advisories/GHSA-h6q3-vv32-2cq5 | nvd | 2022-11-18 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/tensorflow/tensorflow/commit/72c0bdcb25305b0b36842d746cc61d72658d2941 | Patch, Third Party Advisory |
| https://github.com/tensorflow/tensorflow/security/advisories/GHSA-h6q3-vv32-2cq5 | Exploit, Patch, Third Party Advisory |
| https://github.com/tensorflow/tensorflow/blob/091e63f0ea33def7ecad661a5ac01dcafbafa90b/tensorflow/lite/kernels/internal/reference/conv3d_transpose.h#L121 | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| google:tensorflow | >= 2.10.0, < 2.10.1; >= 2.9.0, < 2.9.3; < 2.8.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: 339
- Repositories high signal: 138
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2022-11-18
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts