CVE-2022-23578: TensorFlow Memory Leak Vulnerability

tensorflow Updated 18 Jul 2026

Summary

09/07/2026
Yes i
Moderate
4.3

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open-source machine learning library widely used for various applications, including deep learning and neural networks. It provides a flexible architecture for deploying computation across a range of platforms. However, like any complex software, it can have vulnerabilities that may impact its performance and reliability. The specific vulnerability discussed here involves a memory leak in the TensorFlow library, which can lead to inefficient memory usage and potential application crashes.

Vulnerability Detail

The vulnerability arises from a memory leak in the implementation of the ImmutableExecutorState::Initialize function in TensorFlow. When an invalid graph node is encountered, TensorFlow fails to properly deallocate memory associated with the OpKernel pointer, leading to memory leaks. This can result in increased memory consumption over time, potentially causing applications to run out of memory and crash. The issue is particularly concerning for applications that rely on TensorFlow for large-scale computations, as it can degrade performance and stability.

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.3 2.5.3
    pip install --upgrade "tensorflow==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow==2.6.3"
  • >= 2.7.0, < 2.7.1 2.7.1
    pip 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 of TensorFlow as soon as it is available.

Conclusion

In summary, CVE-2022-23578 is a memory leak vulnerability in TensorFlow that can lead to significant memory issues in applications. Users are strongly encouraged to update to the latest patched versions to mitigate the risks associated with this vulnerability. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-23578 is a vulnerability in TensorFlow that leads to memory leaks when an invalid graph node is processed.

This vulnerability can cause increased memory usage, potentially leading to application crashes or degraded performance.

Affected versions include TensorFlow 2.5.3, 2.6.0, 2.7.0, and earlier versions prior to the patched releases.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.

While there are no specific workarounds, it is advisable to monitor your application for memory usage and plan to update to the patched version as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

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.3 2.5.3
    pip install --upgrade "tensorflow==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow==2.6.3"
  • >= 2.7.0, < 2.7.1 2.7.1
    pip 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback