CVE-2022-21741Google Tensorflow
Medium 6.5
Follow: this CVE · Google · Google Tensorflow We alert you by email or Slack (account required).
- Priority
- 39
- CVSS 3.1
- 6.5
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 51
- Auth required
- Yes
- Published
- Feb 3, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-369
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
What happens
Tensorflow is an Open Source Machine Learning Framework. ### Impact An attacker can craft a TFLite model that would trigger a division by zero in the implementation of depthwise convolutions. The parameters of the convolution can be user controlled and are also used within a division operation to determine the size of the padding that needs to be added before applying the convolution. There is no check before this division that the divisor is strictly positive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
What to do
- Apply the vendor's security update for Tensorflow.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | tensorflow |
< 2.5.3 |
2.5.3 |
pip install "tensorflow>=2.5.3" |
| PyPI | tensorflow |
≥ 2.6.0 < 2.6.3 |
2.6.3 |
pip install "tensorflow>=2.6.3" |
| PyPI | tensorflow |
≥ 2.7.0 < 2.7.1 |
2.7.1 |
pip install "tensorflow>=2.7.1" |
| PyPI | tensorflow |
< 2.5.3 |
2.5.3 |
pip install "tensorflow>=2.5.3" |
| PyPI | tensorflow |
≥ 2.6.0 < 2.6.3 |
2.6.3 |
pip install "tensorflow>=2.6.3" |
| PyPI | tensorflow |
≥ 2.7.0 < 2.7.1 |
2.7.1 |
pip install "tensorflow>=2.7.1" |
| PyPI | tensorflow-cpu |
< 2.5.3 |
2.5.3 |
pip install "tensorflow-cpu>=2.5.3" |
| PyPI | tensorflow-cpu |
≥ 2.6.0 < 2.6.3 |
2.6.3 |
pip install "tensorflow-cpu>=2.6.3" |
| PyPI | tensorflow-cpu |
≥ 2.7.0 < 2.7.1 |
2.7.1 |
pip install "tensorflow-cpu>=2.7.1" |
| PyPI | tensorflow-cpu |
< 2.5.3 |
2.5.3 |
pip install "tensorflow-cpu>=2.5.3" |
| PyPI | tensorflow-cpu |
≥ 2.6.0 < 2.6.3 |
2.6.3 |
pip install "tensorflow-cpu>=2.6.3" |
| PyPI | tensorflow-gpu |
< 2.5.3 |
2.5.3 |
pip install "tensorflow-gpu>=2.5.3" |
| PyPI | tensorflow-gpu |
≥ 2.6.0 < 2.6.3 |
2.6.3 |
pip install "tensorflow-gpu>=2.6.3" |
| PyPI | tensorflow-gpu |
≥ 2.7.0 < 2.7.1 |
2.7.1 |
pip install "tensorflow-gpu>=2.7.1" |
| PyPI | tensorflow-gpu |
< 2.5.3 |
2.5.3 |
pip install "tensorflow-gpu>=2.5.3" |
| PyPI | tensorflow-gpu |
≥ 2.6.0 < 2.6.3 |
2.6.3 |
pip install "tensorflow-gpu>=2.6.3" |
Per OSV / GitHub Advisories (GHSA-428x-9xc2-m8mj, PYSEC-2026-3095, PYSEC-2022-65, PYSEC-2022-120). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| tensorflow | ≤ 2.5.2 | |
| tensorflow | ≥ 2.6.0 ≤ 2.6.2 | |
| tensorflow | 2.7.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Exploit Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory