CVE-2022-29201: TensorFlow QuantizedConv2D Undefined Behavior Vulnerability

tensorflow Updated 18 Jul 2026

Summary

09/07/2026
Yes i
Moderate
5.5

CVE-2022-29201: Missing validation results in undefined behavior in QuantizedConv2D. 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

The same CVE-2022-29201 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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. The library includes various operations, including quantized operations that optimize performance on hardware with limited precision. However, a vulnerability in the QuantizedConv2D operation can lead to undefined behavior when input arguments are not properly validated.

Vulnerability Detail

The vulnerability arises from the implementation of the tf.raw_ops.QuantizedConv2D function, which fails to validate input arguments adequately. When empty arguments are passed, the function binds references to nullptr, leading to potential crashes or undefined behavior during execution. This can be exploited by providing invalid input shapes, which may result in unexpected application behavior, making it critical for users to address this issue promptly.

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.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip 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, ensure that all input arguments to the QuantizedConv2D operation are properly validated before calling the function. For example, avoid passing empty tensors as shown below:

import tensorflow as tf

input = tf.constant(1, shape=[1, 2, 3, 3], dtype=tf.quint8)
filter = tf.constant(1, shape=[1, 2, 3, 3], dtype=tf.quint8)
min_input = tf.constant(0, shape=[], dtype=tf.float32)
max_input = tf.constant(0, shape=[], dtype=tf.float32)
min_filter = tf.constant(0, shape=[], dtype=tf.float32)
max_filter = tf.constant(0, shape=[], dtype=tf.float32)

# Valid arguments should be provided
# Call the QuantizedConv2D operation with valid inputs
result = tf.raw_ops.QuantizedConv2D(
  input=input,
  filter=filter,
  min_input=min_input,
  max_input=max_input,
  min_filter=min_filter,
  max_filter=max_filter,
  strides=[1, 1, 1, 1],
  padding="SAME")

Conclusion

The CVE-2022-29201 vulnerability in TensorFlow's QuantizedConv2D operation poses a risk of undefined behavior due to inadequate input validation. Users are advised to update to the latest patched versions to mitigate this risk and ensure the stability of their applications.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-29201 is a vulnerability in TensorFlow's QuantizedConv2D operation that can lead to undefined behavior due to insufficient input validation.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The affected versions include TensorFlow 2.6.0 to 2.8.0. The vulnerability has been patched in versions 2.6.4, 2.7.2, and 2.8.1.

If an immediate update is not possible, ensure that you validate all input arguments to the QuantizedConv2D operation to prevent undefined behavior.

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

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip 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 →

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