CVE-2022-29200: Denial of Service Vulnerability in TensorFlow
Summary
CVE-2022-29200: Missing validation causes denial of service via LSTMBlockCell. 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-29200 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. The vulnerability identified as CVE-2022-29200 affects TensorFlow versions 0 to 2.6.4, 2.7.0 to 2.7.2, and 2.8.0 to 2.8.1. This vulnerability can be exploited to cause a denial of service (DoS) attack by triggering a CHECK-failure in the tf.raw_ops.LSTMBlockCell function. The function does not properly validate the input arguments, leading to the failure and subsequent DoS.
Vulnerability Detail
The vulnerability arises from the lack of input argument validation in the implementation of the tf.raw_ops.LSTMBlockCell function in TensorFlow. Attackers can exploit this vulnerability by providing malicious input arguments that trigger a CHECK-failure. This can result in a DoS attack, rendering the affected TensorFlow application unresponsive. The vulnerability has a CVSS score of 5.5, indicating a moderate severity level. It was reported by Neophytos Christou from Secure Systems Lab at Brown University.
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
As a workaround, users can implement their own input argument validation before calling the tf.raw_ops.LSTMBlockCell function. By ensuring that the input arguments have the correct ranks, users can mitigate the risk of triggering the CHECK-failure and potential DoS attack. Here is an example of how to validate the ranks of the input arguments in Python:
import tensorflow as tf
x = tf.constant(0.837607, shape=[28,29], dtype=tf.float32)
cs_prev = tf.constant(0, shape=[28,17], dtype=tf.float32)
h_prev = tf.constant(0.592631638, shape=[28,17], dtype=tf.float32)
w = tf.constant(0.887386262, shape=[46,68], dtype=tf.float32)
wci = tf.constant(0, shape=[], dtype=tf.float32)
wcf = tf.constant(0, shape=[17], dtype=tf.float32)
wco = tf.constant(0.592631638, shape=[28,17], dtype=tf.float32)
b = tf.constant(0.75259006, shape=[68], dtype=tf.float32)
if len(x.shape) != 2 or len(cs_prev.shape) != 2 or len(h_prev.shape) != 2 or len(w.shape) != 2 or len(wci.shape) != 0 or len(wcf.shape) != 1 or len(wco.shape) != 2 or len(b.shape) != 1:
raise ValueError('Invalid ranks of input arguments')
# Call the LSTMBlockCell function
result = tf.raw_ops.LSTMBlockCell(x=x, cs_prev=cs_prev, h_prev=h_prev, w=w, wci=wci, wcf=wcf, wco=wco, b=b, forget_bias=1, cell_clip=0, use_peephole=False)
Conclusion
The vulnerability identified as CVE-2022-29200 in TensorFlow can lead to a denial of service (DoS) attack by exploiting a CHECK-failure in the tf.raw_ops.LSTMBlockCell function. It is recommended to update TensorFlow to versions 2.6.4, 2.7.2, or 2.8.1 to mitigate this vulnerability. Users can also implement input argument validation as a workaround. For further support on vulnerability remediation, please contact 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.
The vulnerability allows attackers to trigger a denial of service (DoS) attack by exploiting a CHECK-failure in the tf.raw_ops.LSTMBlockCell function. This can render the affected TensorFlow application unresponsive.
To fix this vulnerability, update your TensorFlow installation to version 2.6.4, 2.7.2, or 2.8.1. These versions include the necessary patches to address the vulnerability.
Yes, you can implement your own input argument validation before calling the tf.raw_ops.LSTMBlockCell function. By ensuring the correct ranks of the input arguments, you can mitigate the risk of triggering the CHECK-failure.
This vulnerability was reported by Neophytos Christou from Secure Systems Lab at Brown University.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.