CVE-2022-23593: TensorFlow Segfault Vulnerability in simplifyBroadcast Function
Summary
CVE-2022-23593: Segfault in simplifyBroadcast in Tensorflow. Affects tensorflow versions >= 2.8.0-rc0, < 2.8.0. Fixed in 2.8.0. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · 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 library developed by Google, widely used for building and training machine learning models. It offers a flexible architecture that allows deployment across various platforms, including CPUs, GPUs, and TPUs. The library is known for its extensive capabilities in deep learning and neural network applications. However, a vulnerability has been identified in the MLIR-TFRT infrastructure, specifically within the simplifyBroadcast function, which can lead to a segmentation fault when called with scalar shapes.
Vulnerability Detail
The vulnerability arises from the simplifyBroadcast function in TensorFlow, which is susceptible to a segmentation fault (segfault) if invoked with scalar shapes. This can lead to a denial of service, as the application may crash unexpectedly. The issue is rooted in the handling of shapes within the function, where an empty SmallVector is created when all shapes are scalar, resulting in an invalid memory access. This vulnerability can be exploited by attackers to disrupt the normal operation of applications relying on TensorFlow.
How To Fix
Latest published version: 2.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow==2.21.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
2.8.0
This is the first release that contains the fix.
pip install --upgrade "tensorflow==2.8.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to upgrade to the patched version of TensorFlow.
Conclusion
The CVE-2022-23593 vulnerability in TensorFlow's simplifyBroadcast function poses a significant risk, leading to potential application crashes. It is crucial for users to update to version 2.8.0 or later to mitigate this risk. Regular monitoring of open-source vulnerabilities, such as through Vulert, can help maintain application security.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-23593 is a vulnerability in TensorFlow's simplifyBroadcast function that can cause a segmentation fault when called with scalar shapes.
Exploiting this vulnerability can lead to a denial of service, causing applications that use TensorFlow to crash unexpectedly.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The only affected version is TensorFlow 2.8.0-rc0. Updating to version 2.8.0 or later will resolve the issue.
You can update TensorFlow by running the command 'pip install --upgrade tensorflow' in your terminal or command prompt.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.