CVE-2021-29523: TensorFlow - Denial of Service via CHECK-fail in AddManySparseToTensorsMap
Summary
CVE-2021-29523: CHECK-fail in AddManySparseToTensorsMap. Affects tensorflow across 4 version ranges.
< 2.1.4
>= 2.2.0, < 2.2.3
>= 2.3.0, < 2.3.3
>= 2.4.0, < 2.4.2
Fixed in 4 releases; the minimum fixed version depends 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-29523 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 set of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various industries and research domains for tasks such as image recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to a denial of service attack.
Vulnerability Detail
The vulnerability (CVE-2021-29523) in TensorFlow is triggered by a CHECK-fail in the tf.raw_ops.AddManySparseToTensorsMap function. The implementation of this function uses the values specified in the sparse_shape parameter as dimensions for the output shape. However, the TensorShape constructor used in this implementation has a legacy implementation that triggers a CHECK operation when there is a non-OK status returned by the InitDims function. This can be exploited by an attacker to cause a denial of service by triggering the CHECK-fail and crashing the application. The vulnerability affects versions of TensorFlow ranging from 0 to 2.4.2.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.1.42.1.4 -
>= 2.2.0, < 2.2.32.2.3 -
>= 2.3.0, < 2.3.32.3.3 -
>= 2.4.0, < 2.4.22.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 currently no known workaround for this vulnerability. Users are advised to update to the latest version of TensorFlow as soon as it becomes available.
Conclusion
The vulnerability in TensorFlow (CVE-2021-29523) can lead to a denial of service attack. It is important for users to update their TensorFlow installations to the latest available version to mitigate the risk of exploitation. 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 resources for building and deploying machine learning models.
This vulnerability can be exploited by an attacker to cause a denial of service by crashing the application.
Versions of TensorFlow ranging from 0 to 2.4.2 are affected by this vulnerability.
There is currently no known workaround for this vulnerability. It is recommended to update to the latest version of TensorFlow as soon as it becomes available.
To protect your application from this vulnerability, update your TensorFlow installation to the latest available version and follow best practices for secure coding and input validation.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.