CVE-2022-23571: TensorFlow Reachable Assertion Vulnerability Leading to Denial of Service
Summary
CVE-2022-23571: Reachable Assertion 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-23571 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 developed by Google. It is widely used for building and training machine learning models, offering a flexible architecture that allows deployment across various platforms. TensorFlow supports a range of tasks, from deep learning to numerical computation. However, like any complex software, it can be susceptible to vulnerabilities that may compromise its stability and security.
Vulnerability Detail
The vulnerability arises from a flaw in the tensor decoding process from protobuf, where a CHECK assertion can be invalidated due to user-controlled arguments. Specifically, this occurs when tensors have an invalid data type (dtype) and zero elements or an invalid shape. Exploiting this vulnerability can lead to denial of service (DoS) attacks on TensorFlow processes, potentially disrupting applications that rely on TensorFlow for machine learning tasks.
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
Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to update to the patched version of TensorFlow as soon as possible.
Conclusion
In summary, CVE-2022-23571 is a significant vulnerability in TensorFlow that can lead to denial of service attacks. It is crucial for users to update to the latest patched versions to mitigate this risk. Regular monitoring of dependencies using tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-23571 is a vulnerability in TensorFlow that can lead to denial of service due to an invalid CHECK assertion when decoding tensors from protobuf.
Exploiting this vulnerability can cause TensorFlow processes to crash, leading to service interruptions in applications that depend on TensorFlow for machine learning.
Affected versions include TensorFlow 2.5.0 to 2.7.0. The vulnerability has been patched in versions 2.5.3, 2.6.3, and 2.7.1.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your application without any signup.
The CVSS score for this vulnerability is 6.5, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.