CVE-2022-41891: TensorFlow GPU Segfault in TensorListConcat Function
Summary
CVE-2022-41891: Segfault in tf.raw_ops.TensorListConcat. Affects tensorflow-gpu across 3 version ranges.
< 2.8.4
>= 2.9.0, < 2.9.3
>= 2.10.0, < 2.10.1
Fixed in 2.8.4, 2.9.3 or 2.10.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
The same CVE-2022-41891 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 that provides a comprehensive ecosystem for building and deploying machine learning models. The 'tensorflow-gpu' package enables users to leverage GPU acceleration for their TensorFlow applications, enhancing performance for computationally intensive tasks. However, like any complex software, TensorFlow can have vulnerabilities that may impact its stability and security.
Vulnerability Detail
The vulnerability identified as CVE-2022-41891 arises from a segmentation fault in the 'tf.raw_ops.TensorListConcat' function when provided with an empty element shape. This flaw can lead to a denial of service attack, as it allows an attacker to crash the application by exploiting this function. The issue is triggered when the function is called with 'element_shape=[]', which is not handled correctly, resulting in a crash.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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.8.42.8.4pip install --upgrade "tensorflow-gpu==2.8.4" -
>= 2.9.0, < 2.9.32.9.3pip install --upgrade "tensorflow-gpu==2.9.3" -
>= 2.10.0, < 2.10.12.10.1pip install --upgrade "tensorflow-gpu==2.10.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, avoid using 'tf.raw_ops.TensorListConcat' with an empty element shape. Here is an example of how to use the function correctly:
import tensorflow as tf
Correct usage with a valid element shape
input_handle = tf.data.experimental.to_variant(tf.data.Dataset.from_tensor_slices([1, 2, 3])) element_dtype = tf.dtypes.float32 element_shape = [None] # Use a valid shape instead of []
result = tf.raw_ops.TensorListConcat(input_handle=input_handle, element_dtype=element_dtype, element_shape=element_shape)
Conclusion
CVE-2022-41891 is a significant vulnerability in TensorFlow's 'tf.raw_ops.TensorListConcat' function that can lead to application crashes. Users are encouraged to update to the latest patched versions to mitigate this risk. Additionally, understanding the correct usage of the function can help prevent exploitation.
See every vulnerability recorded for tensorflow-gpu →
FAQ
CVE-2022-41891 is a vulnerability in TensorFlow's 'tf.raw_ops.TensorListConcat' function that can lead to a segmentation fault and potential denial of service.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The patched versions of TensorFlow that fix this vulnerability are 2.8.4, 2.9.3, and 2.10.1.
If you cannot update, avoid using 'tf.raw_ops.TensorListConcat' with an empty element shape to prevent triggering the vulnerability.
The CVSS score of this vulnerability is 4.8, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.