CVE-2022-23562: Integer overflow in Tensorflow
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 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 could lead to integer overflows, resulting in undefined behavior or extremely large allocations.
Vulnerability Detail
The vulnerability in Tensorflow is related to the implementation of the Range function. Due to integer overflows, the behavior of the function becomes unpredictable, and in some cases, it can lead to excessive memory allocations. This vulnerability can be exploited by an attacker to cause a denial-of-service (DoS) condition or potentially execute arbitrary code. The impact of this vulnerability is considered high, with a CVSS score of 7.6.
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 specific workaround provided for this vulnerability. It is recommended to apply the patches or upgrade to the patched versions as mentioned in the 'how_to_fix' section.
Conclusion
The vulnerability in Tensorflow related to integer overflows in the Range function can have serious consequences, including DoS attacks and arbitrary code execution. It is crucial to apply the provided patches or upgrade to the patched versions to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
Tensorflow is an open-source machine learning framework developed by Google. It provides tools and libraries for building and deploying machine learning models.
The vulnerability can lead to undefined behavior or excessive memory allocations, potentially causing a denial-of-service (DoS) condition or arbitrary code execution.
To fix this vulnerability, it is recommended to update to the latest version of Tensorflow (2.8.0) once it becomes available. Alternatively, you can upgrade to the patched versions (2.7.1, 2.6.3, or 2.5.3) that include the fix.
No specific workaround is provided for this vulnerability. Applying the patches or upgrading to the patched versions is the recommended solution.
You can refer to the security guide of Tensorflow for more information regarding the security model and how to contact the Tensorflow team with any issues or questions.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.