CVE-2022-36026: TensorFlow Denial of Service Vulnerability in QuantizeAndDequantizeV3

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
5.9

CVE-2022-36026: TensorFlow vulnerable to CHECK fail in QuantizeAndDequantizeV3. Affects tensorflow across 3 version ranges.

< 2.7.2 >= 2.8.0, < 2.8.1 >= 2.9.0, < 2.9.1

Fixed in 2.7.2, 2.8.1 or 2.9.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-36026 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an open-source machine learning framework widely used for building and training deep learning models. It provides a comprehensive ecosystem for developing machine learning applications, including tools for data manipulation, model training, and deployment. The framework is designed to be flexible and scalable, allowing developers to create complex models efficiently. However, TensorFlow has been found to have a vulnerability in the QuantizeAndDequantizeV3 operation, which can lead to potential denial of service attacks.

Vulnerability Detail

The vulnerability arises when the QuantizeAndDequantizeV3 function is provided with a nonscalar num_bits input tensor. This results in a CHECK fail, which can be exploited to trigger a denial of service attack. An attacker can craft an input that causes the function to fail, leading to application crashes or unresponsive behavior. The specific technical aspect of this vulnerability is related to the handling of input tensors, which should be scalar but can be manipulated to be nonscalar, causing the function to fail unexpectedly.

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.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"
  • >= 2.9.0, < 2.9.1 2.9.1
    pip install --upgrade "tensorflow==2.9.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 the num_bits input tensor is always a scalar before calling the QuantizeAndDequantizeV3 function. Here is an example of how to do this in code:

import tensorflow as tf

signed_input = True range_given = False narrow_range = False axis = -1 input = tf.constant(-3.5, shape=[1], dtype=tf.float32) input_min = tf.constant(-3.5, shape=[1], dtype=tf.float32) input_max = tf.constant(-3.5, shape=[1], dtype=tf.float32) num_bits = tf.constant(8, shape=[1], dtype=tf.int32) # Ensure this is a scalar

Call the function with a valid scalar num_bits

result = tf.raw_ops.QuantizeAndDequantizeV3(input=input, input_min=input_min, input_max=input_max, num_bits=num_bits, signed_input=signed_input, range_given=range_given, narrow_range=narrow_range, axis=axis)

Conclusion

In summary, CVE-2022-36026 is a significant vulnerability in TensorFlow that can lead to denial of service attacks if exploited. Users are encouraged to update to the latest patched versions to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-36026 is a vulnerability in TensorFlow's QuantizeAndDequantizeV3 function that can lead to denial of service attacks.

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

The affected versions include TensorFlow 2.7.0 to 2.9.0. The vulnerability has been patched in versions 2.7.2, 2.8.1, 2.9.1, and 2.10.0.

The CVSS score of this vulnerability is 5.9, indicating a moderate level of severity.

You can update TensorFlow by running the command: pip install --upgrade tensorflow in your terminal.

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.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"
  • >= 2.9.0, < 2.9.1 2.9.1
    pip install --upgrade "tensorflow==2.9.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