CVE-2022-41891: TensorFlow Segfault in TensorListConcat

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open-source machine learning library developed by Google, widely used for building and training machine learning models. It provides a flexible ecosystem for deploying machine learning applications across various platforms. However, like any software, TensorFlow can have vulnerabilities that may affect its stability and security. This specific vulnerability arises in the TensorListConcat operation, which can lead to severe issues if not addressed.

Vulnerability Detail

The vulnerability occurs in the TensorFlow function tf.raw_ops.TensorListConcat when it is provided with an element_shape of []. This can lead to a segmentation fault, which can be exploited to perform a denial of service attack. The issue is rooted in how TensorFlow handles tensor operations, particularly when the expected shape of the tensor is not met. If an attacker can trigger this function with the incorrect parameters, it could crash the application, leading to service interruptions.

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

If you cannot update TensorFlow immediately, avoid using the tf.raw_ops.TensorListConcat function with an element_shape of []. Here is an example of how to use the function correctly:

import tensorflow as tf

dataset = tf.data.Dataset.from_tensor_slices([1, 2, 3]) input_handle = tf.data.experimental.to_variant(dataset) tf.raw_ops.TensorListConcat( input_handle=input_handle, element_dtype=tf.dtypes.float32, element_shape=[1] # Use a valid shape instead of []

)

Conclusion

The CVE-2022-41891 vulnerability in TensorFlow poses a risk of segmentation faults when using the TensorListConcat operation with an invalid shape. It is crucial to update to the patched versions to mitigate this risk. Users should also consider using the Vulert platform to monitor for vulnerabilities in their applications.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-41891 is a vulnerability in TensorFlow that can lead to a segmentation fault when using the TensorListConcat operation with an invalid element shape.

Exploiting this vulnerability can cause your application to crash, resulting in a denial of service and potential downtime.

Affected versions include TensorFlow 2.8.4, 2.9.0, 2.10.0, and earlier versions.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors open-source vulnerabilities without requiring installation.

The CVSS score for this vulnerability is 4.8, indicating a moderate severity level.

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