CVE-2022-21732: Denial of Service Vulnerability in TensorFlow
Summary
CVE-2022-21732: Memory exhaustion in Tensorflow. Affects tensorflow across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
>= 2.7.0, < 2.7.1
Fixed in 2.5.3, 2.6.3 or 2.7.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-gpu · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-21732 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 open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. However, a vulnerability has been identified in TensorFlow that could lead to a denial of service (DoS) attack.
Vulnerability Detail
The vulnerability in TensorFlow lies in the implementation of the ThreadPoolHandle component. By exploiting this vulnerability, an attacker can trigger a DoS attack by allocating excessive memory. The issue arises due to the lack of an upper bound on the num_threads argument, which is only checked for negativity. As a result, an attacker can specify a large value for num_threads, causing the system to allocate an excessive amount of memory and potentially leading to resource exhaustion. This vulnerability has a medium severity rating.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.5.32.5.3 -
>= 2.6.0, < 2.6.32.6.3 -
>= 2.7.0, < 2.7.12.7.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 specific workaround provided for this vulnerability. Users are encouraged to update to the fixed versions of TensorFlow as soon as possible.
Conclusion
The vulnerability in TensorFlow can be exploited to launch a denial of service attack by allocating excessive memory. To mitigate this risk, it is crucial to update your TensorFlow installation to one of the fixed versions. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework developed by Google. It provides tools and resources for building and deploying machine learning models.
This vulnerability can be exploited to launch a denial of service attack by allocating excessive memory, potentially leading to resource exhaustion.
The vulnerability affects TensorFlow versions 2.5.2, 2.6.0, 2.6.1, 2.6.2, and 2.7.0.
To fix this vulnerability, update your TensorFlow installation to one of the fixed versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3.
No specific workaround is provided for this vulnerability. It is recommended to update to the fixed versions of TensorFlow.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.