CVE-2022-29205: TensorFlow Segfault Due to Missing Support for Quantized Types
Summary
CVE-2022-29205: Segfault due to missing support for quantized types. 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-29205 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 library developed by Google. It provides a comprehensive ecosystem for building and deploying machine learning models, offering tools for deep learning, neural networks, and various data processing tasks. This vulnerability arises from TensorFlow's handling of quantized types, which were not fully supported in certain operations after migrating to version 2.x.
Vulnerability Detail
The vulnerability is a potential segfault or denial of service that occurs when calling TensorFlow operations from the compatibility module (tf.compat.v1.*) that do not support quantized types. Specifically, when a placeholder is created with a quantized type, the absence of a corresponding kernel leads to a null pointer being passed to the parsing function, resulting in a segfault when dereferenced. This can cause the application to crash unexpectedly, impacting the stability and reliability of applications using 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.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, avoid using tf.compat.v1.* operations with quantized types until you can update to a patched version. For example, do not use the following code snippet:
import numpy as np
import tensorflow as tf
tf.compat.v1.placeholder_with_default(input=np.array([2]), shape=tf.constant(dtype=tf.qint8, value=np.array([1])))
Conclusion
In summary, CVE-2022-29205 is a significant vulnerability in TensorFlow that can lead to application crashes due to improper handling of quantized types. It is crucial to update to a patched version to ensure the stability and security of your applications. Utilize tools like Vulert for ongoing monitoring of vulnerabilities.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-29205 is a vulnerability in TensorFlow that can lead to a segfault or denial of service when using certain operations with quantized types.
If your application uses TensorFlow operations that are not compatible with quantized types, it may crash unexpectedly, leading to service disruptions.
Affected versions include TensorFlow 2.6.0 to 2.8.0. The vulnerability has been patched in versions 2.6.4, 2.7.2, 2.8.1, and 2.9.0.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
If an immediate update is not possible, avoid using the affected operations with quantized types as a temporary workaround.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.