CVE-2021-37664: TensorFlow GPU - Out-of-Bounds Read Vulnerability

tensorflow-gpu Updated 02 Oct 2025

Summary

12/08/2021
Yes i
Unrated
Not published

CVE-2021-37664: TensorFlow is an end-to-end open source platform for machine learning. Affects tensorflow-gpu across 3 version ranges.

>= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3 < e84c975313e8e8e38bb2ea118196369c45c51378

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

Also tracked for

The same CVE-2021-37664 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow GPU is a specific package that enables GPU acceleration for TensorFlow. It allows users to leverage the power of GPUs to accelerate their machine learning workflows and achieve faster training and inference times.

Vulnerability Detail

The vulnerability identified as CVE-2021-37664 affects TensorFlow GPU. It arises from a flaw in the BoostedTreesSparseCalculateBestFeatureSplit function, which is responsible for calculating the best feature split in boosted trees. By supplying specially crafted illegal arguments to this function, an attacker can read data from outside the bounds of heap allocated memory. The issue stems from a lack of validation in the stats_summary_indices parameter, which should ensure that each value is within a valid range. This vulnerability can be exploited to leak sensitive information or potentially execute arbitrary code. The issue has been patched in the TensorFlow GitHub repository, and the fix will be included in upcoming releases.

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.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow-gpu==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow-gpu==2.4.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 provided for this vulnerability. The recommended approach is to update TensorFlow GPU to the latest patched version as mentioned in the 'how_to_fix' section.

Conclusion

The vulnerability identified as CVE-2021-37664 affects TensorFlow GPU versions 2.3.0 and above. It allows an attacker to read data from outside the bounds of heap allocated memory. To mitigate this vulnerability, it is crucial to update TensorFlow GPU to one of the patched versions: TensorFlow GPU 2.3.4, 2.4.3, 2.5.1, or the upcoming TensorFlow GPU 2.6.0. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow GPU is a package that enables GPU acceleration for TensorFlow, allowing users to leverage the power of GPUs for faster machine learning workflows.

This vulnerability can be exploited by an attacker to read data from outside the bounds of heap allocated memory, potentially leading to information disclosure or arbitrary code execution.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the Pipfile.lock file.

No, not all versions of TensorFlow GPU are affected. The vulnerability exists in TensorFlow GPU versions 2.3.0 and above. It has been patched in TensorFlow GPU versions 2.3.4, 2.4.3, and 2.5.1, and will be included in TensorFlow GPU 2.6.0.

Yes, a fix has been implemented in the TensorFlow GitHub repository. Users are advised to update their TensorFlow GPU installation to one of the patched versions mentioned in the 'how_to_fix' section.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow-gpu==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow-gpu==2.4.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