CVE-2022-23578: Memory leak in TensorFlow
Summary
CVE-2022-23578: Memory leak 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-23578 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 memory leak vulnerability has been identified in TensorFlow, which could potentially lead to resource exhaustion and impact the stability and performance of applications using the framework.
Vulnerability Detail
The vulnerability (CVE-2022-23578) in TensorFlow is caused by a memory leak in the implementation of ImmutableExecutorState::Initialize. When a graph node is invalid, TensorFlow fails to properly deallocate the memory allocated to the OpKernel pointer item->kernel. As a result, the leaked memory can accumulate over time and potentially lead to resource exhaustion. This vulnerability has a CVSS score of 4.3, indicating a moderate severity level.
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. Users are strongly recommended to apply the available patches and update their TensorFlow installations to the fixed versions.
Conclusion
The memory leak vulnerability in TensorFlow (CVE-2022-23578) has been addressed by the TensorFlow development team. Users are advised to update their TensorFlow installations to the patched versions to mitigate the risk of resource exhaustion and ensure the stability and performance of their applications. For further support on 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 a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models.
The vulnerability can lead to a memory leak in TensorFlow, potentially causing resource exhaustion and impacting the stability and performance of applications using the framework.
To fix this vulnerability, update your TensorFlow installation to the patched versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3.
No specific workaround is provided for this vulnerability. It is recommended to apply the available patches and update TensorFlow to the fixed versions.
This vulnerability has a CVSS score of 4.3, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.