CVE-2022-29201: TensorFlow GPU - Missing Input Validation in QuantizedConv2D Leading to Undefined Behavior
Summary
CVE-2022-29201: Missing validation results in undefined behavior in QuantizedConv2D. Affects tensorflow-gpu 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 · PyPI
- tensorflow-cpu · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
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.
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 framework widely used for building and deploying machine learning models. The 'tensorflow-gpu' package allows users to leverage GPU acceleration for TensorFlow operations, enhancing performance for computationally intensive tasks. However, certain operations, like QuantizedConv2D, have been found to lack proper input validation, making them susceptible to undefined behavior when incorrect arguments are provided.
Vulnerability Detail
The vulnerability arises from the implementation of the tf.raw_ops.QuantizedConv2D operation, which does not adequately validate its input arguments. This oversight can lead to references being bound to nullptr for empty arguments, resulting in undefined behavior during execution. If exploited, this vulnerability could cause application crashes or unpredictable behavior, potentially compromising the integrity of the machine learning model being processed.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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-gpu==2.6.4" -
>= 2.7.0, < 2.7.22.7.2pip install --upgrade "tensorflow-gpu==2.7.2" -
>= 2.8.0, < 2.8.12.8.1pip install --upgrade "tensorflow-gpu==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 temporary workaround, avoid using the QuantizedConv2D operation with empty input arguments. Ensure that all input tensors are properly initialized and contain valid data before invoking this operation. For example, replace the following code:
min_input = tf.constant([], shape=[0], dtype=tf.float32)
with a valid tensor:
min_input = tf.constant([0.0], shape=[1], dtype=tf.float32)
Conclusion
In summary, CVE-2022-29201 is a significant vulnerability in the TensorFlow GPU package that can lead to undefined behavior due to missing input validation in the QuantizedConv2D operation. Users are strongly advised to update to the patched versions to mitigate the risk associated with this vulnerability.
See every vulnerability recorded for tensorflow-gpu →
FAQ
CVE-2022-29201 is a vulnerability in the TensorFlow GPU package related to the QuantizedConv2D operation, which lacks proper input validation.
If your application uses the affected QuantizedConv2D operation with invalid inputs, it may lead to crashes or unpredictable behavior.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
As a temporary measure, ensure that all input arguments to the QuantizedConv2D operation are valid and not empty to avoid triggering the vulnerability.
The CVSS score for this vulnerability is 5.5, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.