CVE-2022-23576: Integer Overflow in TensorFlow-GPU
Summary
CVE-2022-23576: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< b9bd6cfd1c50e6807846af9a86f9b83cafc9c8ae
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-23576 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-GPU is an open-source machine learning framework that provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. It is widely used in various domains, including research, industry, and academia. TensorFlow-GPU leverages the power of GPUs to accelerate the training and inference processes, making it suitable for handling large-scale machine learning tasks.
Vulnerability Detail
The vulnerability (CVE-2022-23576) in TensorFlow-GPU lies in the implementation of the OpLevelCostEstimator::CalculateOutputSize function. It is susceptible to an integer overflow when an operation involves tensors with a large number of elements. This overflow can occur due to either a large number of dimensions in the output_shape.dim() or a small number of dimensions that are large enough to trigger the multiplication overflow. An attacker can exploit this vulnerability to cause unexpected behavior, including crashes, memory corruption, or even remote code execution. The impact of this vulnerability can be severe, potentially compromising the integrity and security of machine learning models and systems that rely on TensorFlow-GPU.
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 temporary workaround, users can consider limiting the number of dimensions or reducing the size of tensors involved in operations to avoid triggering the integer overflow. However, this workaround may not be feasible in all scenarios and may impact the performance or accuracy of machine learning models. It is strongly advised to apply the official fix provided by the TensorFlow team as soon as possible.
Conclusion
The vulnerability (CVE-2022-23576) in TensorFlow-GPU poses a significant risk to the security and integrity of machine learning models and systems. It is crucial for users to update to the latest patched version of TensorFlow-GPU as soon as it becomes available. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow-GPU is an open-source machine learning framework that leverages GPUs for accelerated training and inference processes.
The vulnerability can lead to unexpected behavior, including crashes, memory corruption, or remote code execution, potentially compromising the integrity and security of TensorFlow-GPU-based systems.
The vulnerability affects TensorFlow-GPU versions 2.5.3, 2.6.3, and 2.7.1. The upcoming release, TensorFlow 2.8.0, will include the fix.
To fix this vulnerability, it is recommended to update to the latest patched version of TensorFlow-GPU once it becomes available. Follow the official TensorFlow documentation or use package managers like pip to update your installation.
As a temporary workaround, you can try limiting the number of dimensions or reducing the size of tensors involved in operations to avoid triggering the integer overflow. However, applying the official fix is strongly advised.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.