CVE-2022-23592: TensorFlow Heap Out-of-Bounds Read Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2022-23592: Out of bounds read in Tensorflow. Affects tensorflow versions >= 2.7.0, < 2.8.0. Fixed in 2.8.0. How to fix ↓

Also tracked for

The same CVE-2022-23592 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 Your last release was probably never penetration tested 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 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. This vulnerability affects versions of TensorFlow prior to 2.8.0.

Vulnerability Detail

The vulnerability in TensorFlow arises from a flaw in its type inference mechanism. During type inference, TensorFlow fails to perform proper bounds checking, which can lead to a heap out-of-bounds read. This issue occurs because the bounds checking is implemented using DCHECK, which is a no-op during production. An attacker can exploit this vulnerability by manipulating the input_idx variable to exceed the number of values in node_t.args. The impact of this vulnerability can range from information disclosure to potential remote code execution.

How To Fix

Minimum fixed version

2.8.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can implement input validation and bounds checking in their own code to prevent the exploitation of this vulnerability. Here is an example of how to perform bounds checking for the input_idx variable:

if input_idx < len(node_t.args):
    # Perform normal processing
else:
    # Handle out-of-bounds case

Conclusion

The TensorFlow heap out-of-bounds read vulnerability (CVE-2022-23592) can have serious security implications, potentially leading to information disclosure or remote code execution. It is crucial for users of TensorFlow to upgrade to version 2.8.0 or later to mitigate this vulnerability. Implementing input validation and bounds checking in your code can serve as a temporary workaround until the upgrade is performed. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

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.

This vulnerability can lead to a heap out-of-bounds read in TensorFlow, potentially resulting in information disclosure or remote code execution.

Versions of TensorFlow prior to 2.8.0 are affected by this vulnerability.

To fix this vulnerability, users should upgrade their TensorFlow installation to version 2.8.0 or later.

As a temporary workaround, users can implement input validation and bounds checking in their own code to prevent the exploitation of this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Minimum fixed version

2.8.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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