CVE-2021-37675: TensorFlow GPU Division by 0 Vulnerability
Summary
CVE-2021-37675: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-gpu across 3 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
< 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
Fixed in 2.3.4 or 2.4.3, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2021-37675 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 of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. The TensorFlow GPU package, available on PyPI, is specifically designed to leverage GPU acceleration for faster training and inference of machine learning models.
Vulnerability Detail
The TensorFlow GPU package is affected by a division by 0 vulnerability. This vulnerability exists in most implementations of convolution operators in TensorFlow. An attacker can exploit this vulnerability to trigger a denial of service (DoS) attack by causing a crash in the affected system. The vulnerability arises due to missing validations in the shape inference implementation of TensorFlow. Specifically, divisions and modulo operations are performed without proper checks, leading to potential division by 0 errors. This vulnerability can be exploited remotely by an attacker with network access to the affected system.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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.3.0, < 2.3.42.3.4pip install --upgrade "tensorflow-gpu==2.3.4" -
>= 2.4.0, < 2.4.32.4.3pip install --upgrade "tensorflow-gpu==2.4.3"
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 specific workaround available for this vulnerability. It is recommended to apply the fix by updating the TensorFlow GPU package to the latest patched version.
Conclusion
The TensorFlow GPU package is affected by a division by 0 vulnerability that can be exploited to trigger a denial of service attack. Users are advised to update their installations to the latest patched version to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow is an open source platform for machine learning that provides a comprehensive set of tools and resources for developing and deploying machine learning models.
The TensorFlow GPU package is a variant of TensorFlow that is optimized to leverage GPU acceleration for faster training and inference of machine learning models.
This vulnerability allows an attacker to trigger a denial of service (DoS) attack by causing a crash in the affected system. It can be exploited remotely by an attacker with network access to the system.
To fix this vulnerability, update the TensorFlow GPU package to version 2.6.0 or later. The fix has been included in TensorFlow 2.6.0 and will also be backported to earlier versions.
There is no specific workaround available for this vulnerability. It is recommended to update to the latest patched version of the TensorFlow GPU package.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.