CVE-2022-23580: TensorFlow GPU - Shape Inference Vulnerability
Summary
CVE-2022-23580: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< 1361fb7e29449629e1df94d44e0427ebec8c83c7
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-23580 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 ecosystem 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 complex computations efficiently on GPUs, enabling faster training and inference of machine learning models.
Vulnerability Detail
The vulnerability (CVE-2022-23580) in TensorFlow GPU arises during shape inference. In certain scenarios, TensorFlow can allocate a large vector based on a value from a tensor controlled by the user. This can lead to a potential memory allocation vulnerability, which may be exploited by an attacker to cause a denial of service (DoS) or execute arbitrary code. The issue affects versions of TensorFlow GPU up to and including 2.5.3, 2.6.3, and 2.7.1.
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 available for this vulnerability. It is recommended to follow the steps mentioned in the 'how_to_fix' section and upgrade to the fixed versions of TensorFlow GPU.
Conclusion
The shape inference vulnerability in TensorFlow GPU (CVE-2022-23580) can pose a risk to the security and stability of machine learning applications. It is crucial to update to the fixed versions of TensorFlow GPU to mitigate the potential impact. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a variant of TensorFlow that utilizes GPUs for accelerated computation, enabling faster training and inference of machine learning models.
Shape inference in TensorFlow is the process of determining the shape (dimensionality) of tensors at runtime, based on the operations and inputs involved in the computation.
This vulnerability in TensorFlow GPU can potentially lead to a denial of service (DoS) or arbitrary code execution if exploited by an attacker.
Versions of TensorFlow GPU up to and including 2.5.3, 2.6.3, and 2.7.1 are affected by this vulnerability.
To fix this vulnerability, it is recommended to upgrade to TensorFlow GPU version 2.8.0 or later. The fix has also been backported to versions 2.7.1, 2.6.3, and 2.5.3.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.