CVE-2022-23574: TensorFlow GPU - Heap Out-of-Bounds Read/Write

tensorflow-gpu Updated 02 Oct 2025

Summary

04/02/2022
Yes i
Unrated
Not published

CVE-2022-23574: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 < 0657c83d08845cc434175934c642299de2c0f042

Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-23574 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an open-source machine learning framework widely used for developing and training machine learning models. It provides a comprehensive ecosystem for building and deploying machine learning applications. TensorFlow GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. This vulnerability affects versions of TensorFlow GPU up to 2.6.3.

Vulnerability Detail

The vulnerability in TensorFlow GPU arises from a typo in the SpecializeType function. This typo leads to a heap out-of-bounds read/write issue. In the affected code, the variable arg is incorrectly initialized to the ith mutable argument in a loop where the loop index is j. This mistake allows for assigning values to arg from outside the vector of arguments, resulting in both read and write operations beyond the bounds of the data. An attacker could potentially exploit this vulnerability to read sensitive information or modify data in unexpected ways. The issue has been identified and fixed in TensorFlow 2.8.0, and patches have been backported to TensorFlow 2.7.1 and 2.6.3.

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

There is no specific workaround available for this vulnerability. It is strongly advised to update to the patched versions of TensorFlow GPU as mentioned in the 'how_to_fix' section.

Conclusion

The vulnerability in TensorFlow GPU (CVE-2022-23574) exposes a heap out-of-bounds read/write issue. It is crucial to update to the patched versions of TensorFlow GPU (2.8.0, 2.7.1, or 2.6.3) to mitigate the risk of potential data leakage or unauthorized modifications. For further support on vulnerability remediation, please reach out to DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

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.

TensorFlow GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. It is specifically designed to utilize the computational power of GPUs to speed up machine learning tasks.

A heap out-of-bounds read/write vulnerability occurs when a program accesses memory outside the bounds of an allocated heap buffer. This can lead to information disclosure or modification of data that should not be accessible or modifiable.

This vulnerability could allow an attacker to read sensitive information from the heap or modify data in unexpected ways. Depending on the specific context in which TensorFlow GPU is used, the impact could range from data leakage to unauthorized modifications of machine learning models.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert analyzes your Pipfile.lock to identify and alert you about open-source vulnerabilities in your software.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

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

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