CVE-2021-37669: Denial of Service Vulnerability in TensorFlow
Summary
CVE-2021-37669: Crash in NMS ops caused by integer conversion to unsigned in TensorFlow. Affects tensorflow across 3 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
>= 2.5.0, < 2.5.1
Fixed in 2.3.4, 2.4.3 or 2.5.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2021-37669 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 community resources that enable researchers and developers to build and deploy machine learning models. TensorFlow is widely used in various industries and applications, including image and speech recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to denial of service in applications serving models using tf.raw_ops.NonMaxSuppressionV5 and CombinedNonMaxSuppression.
Vulnerability Detail
The vulnerability in TensorFlow arises from a division by zero issue in the tf.raw_ops.NonMaxSuppressionV5 function. The implementation of this function uses a user-controlled argument to resize a std::vector. However, due to an implicit conversion from int to size_t, if a negative value is supplied by an attacker, it results in a crash. A similar issue exists in the CombinedNonMaxSuppression function. An attacker can exploit this vulnerability to cause a denial of service, impacting the availability of applications serving models using these functions. The vulnerability has been assigned the identifier CVE-2021-37669.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 2.3.0, < 2.3.42.3.4 -
>= 2.4.0, < 2.4.32.4.3 -
>= 2.5.0, < 2.5.12.5.1
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 patched versions of TensorFlow as mentioned in the 'how_to_fix' section.
Conclusion
In conclusion, TensorFlow is susceptible to a denial of service vulnerability in the tf.raw_ops.NonMaxSuppressionV5 and CombinedNonMaxSuppression functions. This vulnerability can be exploited by an attacker to cause a crash in applications serving models using these functions. Users are advised to update their TensorFlow installations to the patched versions mentioned in the 'how_to_fix' section. Regularly updating TensorFlow is recommended to stay protected against potential security vulnerabilities. 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 tools and libraries for building and deploying machine learning models.
The vulnerability can be exploited by an attacker to cause denial of service in applications serving models using certain TensorFlow functions.
To fix this vulnerability, update your TensorFlow installation to the patched versions mentioned in the 'how_to_fix' section.
No, only TensorFlow versions 2.3.0 to 2.6.0-rc2 are affected. The vulnerability has been patched in TensorFlow 2.6.0 and backported to earlier versions.
No, there is no known workaround for this vulnerability. Updating to the patched versions is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.