CVE-2022-23588: TensorFlow - Denial of Service due to Reference Tensor Building
Summary
CVE-2022-23588: CHECK-fails due to attempting to build a reference tensor. 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-23588 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 provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. However, a vulnerability has been discovered in TensorFlow that can lead to a denial of service (DoS) attack.
Vulnerability Detail
The vulnerability in TensorFlow arises from a flaw in the Grappler optimizer, which is responsible for optimizing TensorFlow graphs. A malicious user can exploit this flaw by altering a SavedModel in such a way that the Grappler optimizer attempts to build a tensor using a reference data type. This triggers a CHECK-fail in the Tensor constructor, resulting in a crash. Reference data types are not allowed in TensorFlow, and this misuse can lead to a DoS condition. The impact of this vulnerability is a potential disruption of TensorFlow-based applications and services.
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 patch or update to the fixed versions of TensorFlow as soon as possible.
Conclusion
The vulnerability in TensorFlow can lead to a denial of service (DoS) attack by exploiting a flaw in the Grappler optimizer. To mitigate this vulnerability, it is crucial to update TensorFlow to one of the fixed versions or apply the provided patch. 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 developed by Google. It provides tools and resources for building and deploying machine learning models.
The vulnerability can lead to a denial of service (DoS) attack, potentially disrupting TensorFlow-based applications and services.
To fix the vulnerability, update your TensorFlow installation to one of the patched versions: TensorFlow 2.5.3, TensorFlow 2.6.3, TensorFlow 2.7.1, or TensorFlow 2.8.0 (upcoming release).
No, there is no known workaround for this vulnerability. It is recommended to apply the patch or update to the fixed versions of TensorFlow.
For more information regarding TensorFlow security, please consult the official TensorFlow security guide.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.