CVE-2021-29534: Denial of Service Vulnerability in TensorFlow
Summary
CVE-2021-29534: CHECK-fail in SparseConcat. 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-29534 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 a denial of service attack.
Vulnerability Detail
The vulnerability, identified as CVE-2021-29534, resides in the tf.raw_ops.SparseConcat function of TensorFlow. By exploiting this vulnerability, an attacker can trigger a denial of service by causing a CHECK-fail in the implementation. The issue arises from the usage of the TensorShape constructor, which relies on the InitDims function. If InitDims returns a non-OK status, a CHECK operation is triggered, leading to a denial of service. The vulnerability affects multiple versions of TensorFlow, including 2.1.4, 2.2.3, 2.3.3, and 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 no specific workaround available for this vulnerability. It is recommended to apply the patch provided by TensorFlow to mitigate the risk of a denial of service attack.
Conclusion
The vulnerability in TensorFlow can lead to a denial of service attack. It is crucial for users to upgrade to the patched version of TensorFlow to mitigate the risk. Additionally, utilizing vulnerability management tools like Vulert can help in monitoring and alerting for open-source vulnerabilities in software. 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 set of tools and libraries for building and deploying machine learning models.
This vulnerability can be exploited by an attacker to trigger a denial of service attack, potentially disrupting the availability of TensorFlow-based applications.
The vulnerability affects TensorFlow versions 2.1.4, 2.2.3, 2.3.3, and 2.4.2.
To fix this vulnerability, it is recommended to upgrade to TensorFlow version 2.5.0 or any subsequent versions that include the fix. Follow the official upgrade instructions provided by TensorFlow.
There are no specific workarounds available for this vulnerability. Applying the patch provided by TensorFlow is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.