CVE-2022-21725: TensorFlow GPU - Division by 0 in Convolution Operations
Summary
CVE-2022-21725: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< 3218043d6d3a019756607643cf65574fbfef5d7a
Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-21725 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 developing and deploying machine learning models. It provides a comprehensive set of tools and libraries for building and training neural networks. TensorFlow GPU is a variant of TensorFlow that leverages the power of GPUs for accelerated computation. It allows users to perform high-performance deep learning tasks on GPU-enabled systems.
Vulnerability Detail
The vulnerability (CVE-2022-21725) in TensorFlow GPU arises from a flaw in the estimator for the cost of certain convolution operations. The function responsible for estimating the cost fails to validate the stride argument, which can lead to a division by zero error. An attacker could potentially exploit this vulnerability to cause a denial of service (DoS) condition or execute arbitrary code. The impact of this vulnerability depends on the context in which TensorFlow GPU is used and the availability of mitigating controls.
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.5.32.5.3pip install --upgrade "tensorflow-gpu==2.5.3" -
>= 2.6.0, < 2.6.32.6.3pip install --upgrade "tensorflow-gpu==2.6.3"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. However, users can mitigate the risk by ensuring they update their TensorFlow GPU installations to one of the fixed versions as mentioned in the 'how_to_fix' section.
Conclusion
The vulnerability in TensorFlow GPU (CVE-2022-21725) allows for a division by zero error in certain convolution operations. This can potentially lead to a denial of service (DoS) condition or arbitrary code execution. To mitigate the vulnerability, users should update their TensorFlow GPU installations to one of the fixed versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a variant of TensorFlow that utilizes GPUs for accelerated computation, enabling high-performance deep learning tasks.
The impact of this vulnerability depends on the context in which TensorFlow GPU is used and the availability of mitigating controls. It could potentially lead to a denial of service (DoS) condition or arbitrary code execution.
To fix this vulnerability, update your TensorFlow GPU installation to one of the fixed versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3.
There is no specific workaround provided for this vulnerability. However, updating to one of the fixed versions mentioned in the 'how_to_fix' section will mitigate the risk.
You can find more information about this vulnerability in the official TensorFlow documentation, security advisories, or the CVE entry (CVE-2022-21725).
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.