CVE-2022-23578: Memory Leak Vulnerability in TensorFlow
Summary
CVE-2022-23578: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
< c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd
Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · Bitnami
- tensorflow · 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 widely used for developing and training machine learning models. It provides a comprehensive set of tools and libraries for building and deploying machine learning applications. TensorFlow supports both CPU and GPU computations, with the 'tensorflow-gpu' package specifically optimized for GPU acceleration.
Vulnerability Detail
The vulnerability identified as CVE-2022-23578 affects TensorFlow versions 2.5.3, 2.6.3, and 2.7.1, as well as earlier versions within the supported range. The issue arises from an invalid graph node in TensorFlow, which leads to a memory leak in the implementation of ImmutableExecutorState::Initialize. When a graph node is invalid, the item->kernel pointer is set to nullptr, causing the previously allocated memory to leak. This vulnerability can potentially result in memory exhaustion and impact the stability and performance of TensorFlow applications.
How To Fix
Latest published version: 2.12.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-gpu==2.12.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-gpu==2.5.3" -
>= 2.6.0, < 2.6.32.6.3pip install --upgrade "tensorflow-gpu==2.6.3"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As this vulnerability has been fixed in the latest TensorFlow versions, there is no specific workaround available. It is advised to update to the patched versions to ensure the security and stability of TensorFlow applications.
Conclusion
The memory leak vulnerability in TensorFlow (CVE-2022-23578) has been addressed by the TensorFlow development team. Users are strongly advised to update their TensorFlow installations to the latest available version, which includes the necessary fixes. For further support and assistance with vulnerability remediation, please reach out to DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow is an open-source machine learning framework used for developing and training machine learning models. It provides a wide range of tools and libraries for building and deploying machine learning applications.
The vulnerability can lead to memory leaks in TensorFlow, potentially causing memory exhaustion and impacting the stability and performance of TensorFlow applications.
The vulnerability affects TensorFlow versions 2.5.3, 2.6.3, and 2.7.1, as well as earlier versions within the supported range.
To fix this vulnerability, it is recommended to update TensorFlow to the latest available version, which includes the necessary patches.
No, as the vulnerability has been fixed in the latest TensorFlow versions, it is advised to update to the patched versions.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.