CVE-2022-21735: TensorFlow FractionalMaxPool Division by 0
Summary
CVE-2022-21735: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< ba4e8ac4dc2991e350d5cc407f8598c8d4ee70fb
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-21735 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 is available for multiple programming languages and platforms, including Python. The vulnerability described here affects the TensorFlow-GPU package, which is a version of TensorFlow optimized for GPU acceleration.
Vulnerability Detail
The vulnerability in TensorFlow-GPU arises from the implementation of the FractionalMaxPool function. This function can be manipulated in a way that causes a division by zero, leading to a crash of the TensorFlow process. An attacker could potentially exploit this vulnerability to disrupt machine learning processes or cause denial of service. The issue has been identified and fixed in TensorFlow versions 2.8.0, 2.7.1, 2.6.3, and 2.5.3.
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
As a workaround, if you are unable to immediately update to a fixed version, you can consider avoiding the usage of the FractionalMaxPool function in your TensorFlow-GPU code. By removing or replacing this function with an alternative, you can mitigate the risk of encountering the division by zero issue.
Conclusion
In conclusion, the vulnerability in TensorFlow-GPU's FractionalMaxPool function can be exploited to crash the TensorFlow process. It is crucial to update to the fixed versions or apply the provided workaround to mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow is an open-source machine learning framework used for building and training neural networks.
TensorFlow-GPU is a version of TensorFlow optimized for GPU acceleration.
The vulnerability can lead to a crash of the TensorFlow process, potentially disrupting machine learning processes or causing denial of service.
You can fix this vulnerability by updating the TensorFlow-GPU package to one of the fixed versions: 2.8.0, 2.7.1, 2.6.3, or 2.5.3.
Yes, if you are unable to immediately update to a fixed version, you can avoid using the FractionalMaxPool function in your TensorFlow-GPU code.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.