CVE-2022-23562: TensorFlow Integer Overflow Vulnerability
Summary
CVE-2022-23562: Integer overflow 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-23562 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 deploying machine learning models across various platforms. TensorFlow provides a comprehensive ecosystem for deep learning, including tools for data manipulation, model training, and deployment. However, it is susceptible to vulnerabilities that can lead to undefined behavior or excessive resource allocation, impacting the stability and security of applications built on it.
Vulnerability Detail
The vulnerability arises from an integer overflow in the implementation of the 'Range' function within TensorFlow. This flaw can lead to undefined behavior, which may cause applications to crash or behave unpredictably. In some cases, it can result in extremely large memory allocations, potentially exhausting system resources and leading to denial of service. The issue was reported externally and has been tracked through multiple identifiers, including CVE-2022-23562.
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 as soon as it becomes available.
Conclusion
The integer overflow vulnerability in TensorFlow (CVE-2022-23562) poses significant risks to applications using the framework. It is crucial for developers to update to the patched versions to ensure the security and stability of their applications. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for tensorflow →
FAQ
CVE-2022-23562 is a vulnerability in TensorFlow that results from an integer overflow in the 'Range' function, potentially leading to undefined behavior and excessive memory allocation.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The affected versions include TensorFlow 2.5.3, 2.6.0, 2.6.3, 2.7.0, and 2.7.1. The vulnerability has been patched in versions 2.8.0 and later.
While there are no specific workarounds, it is recommended to prioritize updating TensorFlow to mitigate the risk associated with this vulnerability.
The CVSS score for this vulnerability is 7.6, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.