CVE-2021-37661: Denial of Service Vulnerability in TensorFlow-GPU
Summary
CVE-2021-37661: 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
< 8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992
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-37661 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-GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. It is widely used in various industries and research domains for training and inference of machine learning models.
Vulnerability Detail
The vulnerability identified as CVE-2021-37661 affects TensorFlow-GPU versions 2.3.0 to 2.4.3. It resides in the boosted_trees_create_quantile_stream_resource function, which is responsible for creating a quantile stream resource used in boosted tree models. By providing negative arguments to this function, an attacker can trigger a denial of service (DoS) condition. The vulnerability arises from the lack of validation for the num_streams argument, allowing negative values to be used in memory allocation. This results in a crash due to an implicit conversion from a negative value to a large positive unsigned value. The impact of this vulnerability can lead to service disruption and potential data loss.
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 known workaround for this vulnerability. It is recommended to apply the official patches or update to the latest version of TensorFlow-GPU.
Conclusion
The identified vulnerability in TensorFlow-GPU (CVE-2021-37661) can result in a denial of service condition and potential data loss. It is crucial for users of TensorFlow-GPU to update their installations to the latest patched versions or apply the provided patches. Failure to address this vulnerability may expose systems to exploitation. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow-GPU is a variant of TensorFlow that utilizes GPU acceleration for faster machine learning computations.
The vulnerability can lead to a denial of service (DoS) condition, causing service disruption and potential data loss.
Versions 2.3.0 to 2.4.3 of TensorFlow-GPU are affected by this vulnerability.
To fix this vulnerability, update TensorFlow-GPU to version 2.6.0 or later. Alternatively, apply the provided patches for versions 2.5.1, 2.4.3, and 2.3.4.
There is no known workaround. It is recommended to update to the patched versions of TensorFlow-GPU.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.