CVE-2022-29197: Denial of Service Vulnerability in TensorFlow
Summary
CVE-2022-29197: Missing validation causes denial of service via UnsortedSegmentJoin. Affects tensorflow across 3 version ranges.
< 2.6.4
>= 2.7.0, < 2.7.2
>= 2.8.0, < 2.8.1
Fixed in 2.6.4, 2.7.2 or 2.8.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · Bitnami
The same CVE-2022-29197 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 discovered in TensorFlow that can lead to a denial of service attack.
Vulnerability Detail
The vulnerability, identified as CVE-2022-29197, exists in the implementation of tf.raw_ops.UnsortedSegmentJoin in TensorFlow. The function does not properly validate the input arguments, specifically the num_segments parameter. This oversight allows an attacker to trigger a denial of service attack by providing malicious input. By exploiting this vulnerability, an attacker can cause the affected TensorFlow application to crash or become unresponsive, leading to a disruption of service.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow==2.21.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.6.42.6.4pip install --upgrade "tensorflow==2.6.4" -
>= 2.7.0, < 2.7.22.7.2pip install --upgrade "tensorflow==2.7.2" -
>= 2.8.0, < 2.8.12.8.1pip install --upgrade "tensorflow==2.8.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. However, users can mitigate the risk by ensuring they are using an updated version of TensorFlow that includes the fix for CVE-2022-29197.
Conclusion
In conclusion, TensorFlow is affected by a denial of service vulnerability (CVE-2022-29197) that can be exploited by providing malicious input to the tf.raw_ops.UnsortedSegmentJoin function. To mitigate this vulnerability, users should update their TensorFlow installations to the latest available version. There are no known instances of this vulnerability being actively exploited, but it is important to apply the necessary updates to ensure the security and stability of TensorFlow applications. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
The vulnerability can be exploited to trigger a denial of service attack, causing the affected TensorFlow application to crash or become unresponsive.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it for any open-source vulnerabilities, including CVE-2022-29197.
There are no known instances of this vulnerability being actively exploited in the wild. However, it is important to apply the necessary updates to prevent potential attacks.
While there is no specific workaround provided, ensuring that you are using an updated version of TensorFlow can help mitigate the risk of this vulnerability.
This vulnerability was reported by Neophytos Christou from the Secure Systems Lab at Brown University.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.