CVE-2022-41891: Segfault in tf.raw_ops.TensorListConcat

tensorflow Updated 02 Oct 2025

Summary

21/11/2022
Yes i
Moderate
4.8

CVE-2022-41891: Segfault in tf.raw_ops.TensorListConcat. Affects tensorflow 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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The TensorFlow package is an open-source machine learning framework developed by Google. It provides a comprehensive set of tools and libraries 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 the tf.raw_ops.TensorListConcat function, which can lead to a segmentation fault and potential denial of service attack.

Vulnerability Detail

The vulnerability arises when the tf.raw_ops.TensorListConcat function is called with element_shape=[]. This triggers a segmentation fault, which can be exploited to launch a denial of service attack. An attacker can craft a malicious input that triggers the segmentation fault, causing the TensorFlow application to crash and potentially disrupting its functionality. This vulnerability has a CVSS score of 4.8, indicating a moderate severity level.

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.8.4 2.8.4
    pip install --upgrade "tensorflow==2.8.4"
  • >= 2.9.0, < 2.9.3 2.9.3
    pip install --upgrade "tensorflow==2.9.3"
  • >= 2.10.0, < 2.10.1 2.10.1
    pip install --upgrade "tensorflow==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, users can avoid calling the tf.raw_ops.TensorListConcat function with element_shape=[]. Instead, they can provide a non-empty element_shape parameter to prevent the segmentation fault. Here is an example of a modified code snippet:

import tensorflow as tf

tf.raw_ops.TensorListConcat(
    input_handle=tf.data.experimental.to_variant(tf.data.Dataset.from_tensor_slices([1, 2, 3])),
    element_dtype=tf.dtypes.float32,
    element_shape=[1]
)

By specifying a non-empty element_shape, the vulnerability can be mitigated.

Conclusion

In conclusion, the tf.raw_ops.TensorListConcat function in TensorFlow is vulnerable to a segmentation fault when called with element_shape=[]. This can be exploited to launch a denial of service attack. Users should update their TensorFlow installation to one of the patched versions or apply the provided workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework developed by Google. It provides tools and libraries for building and deploying machine learning models.

The vulnerability can be used to trigger a segmentation fault in TensorFlow, potentially leading to a denial of service attack.

To fix the vulnerability, update your TensorFlow installation to one of the patched versions: TensorFlow 2.8.4, TensorFlow 2.9.3, TensorFlow 2.10.1, or TensorFlow 2.11 (upcoming release).

Yes, you can avoid the vulnerability by providing a non-empty element_shape parameter when calling the tf.raw_ops.TensorListConcat function.

This vulnerability was reported by Tong Liu from ShanghaiTech University.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

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.8.4 2.8.4
    pip install --upgrade "tensorflow==2.8.4"
  • >= 2.9.0, < 2.9.3 2.9.3
    pip install --upgrade "tensorflow==2.9.3"
  • >= 2.10.0, < 2.10.1 2.10.1
    pip install --upgrade "tensorflow==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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback