CVE-2022-23581: Denial of Service Vulnerability in TensorFlow
Summary
CVE-2022-23581: CHECK-failures during Grappler's IsSimplifiableReshape in Tensorflow. Affects tensorflow across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
>= 2.7.0, < 2.7.1
Fixed in 2.5.3, 2.6.3 or 2.7.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow-gpu · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-23581 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 of tools, libraries, and resources for building and training neural networks. TensorFlow is available for multiple programming languages and platforms, making it a popular choice among developers and researchers. However, a vulnerability has been discovered in TensorFlow that can lead to a denial of service (DoS) attack.
Vulnerability Detail
The vulnerability, identified as CVE-2022-23581, resides in the Grappler optimizer component of TensorFlow. The Grappler optimizer is responsible for optimizing and improving the performance of TensorFlow models. However, due to a flaw in the IsSimplifiableReshape function, an attacker can manipulate a SavedModel in such a way that it triggers CHECK failures, resulting in a DoS condition. By exploiting this vulnerability, an attacker can cause the affected TensorFlow application to crash or become unresponsive, leading to a disruption of service.
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 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==2.5.3" -
>= 2.6.0, < 2.6.32.6.3pip install --upgrade "tensorflow==2.6.3" -
>= 2.7.0, < 2.7.12.7.1pip install --upgrade "tensorflow==2.7.1"
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 known workaround for this vulnerability. It is recommended to apply the official patches or update to the latest version of TensorFlow.
Conclusion
The vulnerability in TensorFlow can lead to a denial of service (DoS) attack by exploiting the Grappler optimizer. It is crucial to update to the latest patched version of TensorFlow or apply the official patches to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework used for building and training neural networks.
This vulnerability can lead to a denial of service (DoS) condition, causing the affected TensorFlow application to crash or become unresponsive.
To fix this vulnerability, update TensorFlow to version 2.5.3, 2.6.3, 2.7.1, or later.
There are no known workarounds for this vulnerability. Applying the official patches or updating to the latest version is recommended.
For more information, please refer to the TensorFlow security guide and the GitHub advisory database.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.