CVE-2021-29594: TensorFlow Convolution Code Division Vulnerability
Summary
CVE-2021-29594: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow across 5 version ranges.
< 2.1.4
>= 2.2.0, < 2.2.3
>= 2.3.0, < 2.3.3
>= 2.4.0, < 2.4.2
< ff489d95a9006be080ad14feb378f2b4dac35552
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2021-29594 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem for developing and deploying machine learning models. TensorFlow Lite (TFLite) is a lightweight version of TensorFlow designed for mobile and embedded devices. TFLite's convolution code is responsible for performing convolution operations in machine learning models.
Vulnerability Detail
The TFLite's convolution code in TensorFlow has a vulnerability that allows the user to control the divisor in multiple division operations without checking if it is non-zero. This can lead to division by zero errors, resulting in unexpected behavior or crashes in the application. The vulnerability affects versions 2.1.4 and above of TensorFlow, including 2.4.2, 2.3.3, 2.2.3, and 2.1.4. The issue has been fixed in TensorFlow 2.5.0.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow==2.21.0"
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 2.1.42.1.4pip install --upgrade "tensorflow==2.1.4" -
>= 2.2.0, < 2.2.32.2.3pip install --upgrade "tensorflow==2.2.3" -
>= 2.3.0, < 2.3.32.3.3pip install --upgrade "tensorflow==2.3.3" -
>= 2.4.0, < 2.4.22.4.2pip install --upgrade "tensorflow==2.4.2"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to update to the fixed version of TensorFlow as soon as possible.
Conclusion
The TensorFlow Convolution Code Division Vulnerability (CVE-2021-29594) is a vulnerability in the TFLite's convolution code that allows the user to control the divisor in division operations without checking if it is non-zero. This can lead to division by zero errors and unexpected behavior or crashes in the application. It is recommended to update to TensorFlow 2.5.0 or later to fix this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open source platform for machine learning that provides a comprehensive ecosystem for developing and deploying machine learning models.
TensorFlow Lite (TFLite) is a lightweight version of TensorFlow designed for mobile and embedded devices.
The vulnerability allows the user to control the divisor in division operations without checking if it is non-zero, leading to potential division by zero errors.
The vulnerability affects versions 2.1.4 and above of TensorFlow, including 2.4.2, 2.3.3, 2.2.3, and 2.1.4.
To fix this vulnerability, it is recommended to update TensorFlow to version 2.5.0 or later.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.