CVE-2022-36026: TensorFlow CPU Vulnerable to CHECK Fail in QuantizeAndDequantizeV3
Summary
CVE-2022-36026: TensorFlow vulnerable to CHECK fail in QuantizeAndDequantizeV3. Affects tensorflow-cpu 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
- tensorflow · PyPI
- tensorflow-gpu · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
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.
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. TensorFlow supports various operations, including tensor manipulation, neural network construction, and model training. The library is widely used in both research and production environments due to its flexibility and scalability. However, it has been identified that certain versions of TensorFlow CPU are vulnerable to a specific issue in the QuantizeAndDequantizeV3 operation, which can lead to 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. The issue can be demonstrated with the following code snippet: 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([], shape=[0], dtype=tf.int32); 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). This vulnerability can lead to application crashes and service interruptions.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-cpu==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.22.7.2pip install --upgrade "tensorflow-cpu==2.7.2" -
>= 2.8.0, < 2.8.12.8.1pip install --upgrade "tensorflow-cpu==2.8.1" -
>= 2.9.0, < 2.9.12.9.1pip install --upgrade "tensorflow-cpu==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 temporary workaround, avoid passing nonscalar tensors as the num_bits input to the QuantizeAndDequantizeV3 function. Ensure that the num_bits tensor is scalar to prevent triggering the CHECK fail.
Conclusion
In summary, CVE-2022-36026 is a vulnerability in TensorFlow CPU that can lead to denial of service attacks due to improper handling of input tensors in the QuantizeAndDequantizeV3 function. Users are advised to update to the latest patched versions to mitigate this risk.
See every vulnerability recorded for tensorflow-cpu →
FAQ
CVE-2022-36026 is a vulnerability in TensorFlow CPU that can lead to a denial of service attack when the QuantizeAndDequantizeV3 function is misused.
The affected versions include TensorFlow CPU versions prior to 2.7.2, 2.8.1, and 2.9.1.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The CVSS score of this vulnerability is 5.9, indicating a moderate severity level.
If you cannot update TensorFlow immediately, ensure that you do not pass nonscalar tensors as the num_bits input to the QuantizeAndDequantizeV3 function to avoid triggering the vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.