CVE-2022-23593: TensorFlow GPU - Denial of Service Vulnerability
Summary
CVE-2022-23593: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 2 version ranges.
>= 2.7.0, < 2.8.0
< 35f0fabb4c178253a964d7aabdbb15c6a398b69a
Fixed in 35f0fabb4c178253a964d7aabdbb15c6a398b69a. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-23593 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 GPU acceleration for faster computation. It is commonly used in scenarios where large-scale data processing and complex model training are required. However, the TensorFlow GPU package is vulnerable to a denial of service (DoS) attack due to a flaw in the simplifyBroadcast function in the MLIR-TFRT infrastructure.
Vulnerability Detail
The vulnerability arises when the simplifyBroadcast function is called with scalar shapes. In such cases, if all shapes are scalar, the maxRank value becomes 0, resulting in the creation of an empty SmallVector. This leads to a segmentation fault, causing the TensorFlow GPU application to crash and become unresponsive. An attacker can exploit this vulnerability by sending specially crafted input to trigger the simplifyBroadcast function with scalar shapes, thereby causing a DoS condition. The impact of this vulnerability is the disruption of service availability and potential loss of data.
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 version below is the minimum fixed release for this vulnerability.
If you need the minimum change
35f0fabb4c178253a964d7aabdbb15c6a398b69a
This is the first release that contains the fix.
pip install --upgrade "tensorflow-gpu==35f0fabb4c178253a964d7aabdbb15c6a398b69a"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid the vulnerability by ensuring that the simplifyBroadcast function is not called with scalar shapes. This can be achieved by validating the input shapes before invoking the function and handling scalar cases separately. Here is an example of how to implement this workaround in Python:
import tensorflow as tf
def safe_simplify_broadcast(input_shapes):
if all(shape == () for shape in input_shapes):
# Handle scalar case separately
return input_shapes
else:
return tf.simplifyBroadcast(input_shapes)
Conclusion
The TensorFlow GPU package is vulnerable to a denial of service attack due to a flaw in the simplifyBroadcast function. Upgrading to TensorFlow GPU version 2.8.0 or later is necessary to mitigate this vulnerability. Users can also implement a temporary workaround by validating input shapes and handling scalar cases separately. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow GPU is a variant of TensorFlow that utilizes GPU acceleration for faster computation. It is commonly used in scenarios where large-scale data processing and complex model training are required.
simplifyBroadcast is a function in the MLIR-TFRT infrastructure of TensorFlow GPU. It is responsible for handling shape broadcasting, which is a crucial operation in machine learning computations.
The vulnerability occurs when the simplifyBroadcast function is called with scalar shapes. If all shapes are scalar, the function creates an empty SmallVector, leading to a segmentation fault and denial of service.
The vulnerability can be exploited by an attacker to cause a denial of service condition in TensorFlow GPU applications. This results in the application crashing and becoming unresponsive, leading to service disruption and potential data loss.
To fix this vulnerability, it is recommended to upgrade to TensorFlow GPU version 2.8.0 or any subsequent releases that include the fix. Users can update their installation using the command 'pip install --upgrade tensorflow-gpu==2.8.0'.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.