CVE-2021-37635: TensorFlow GPU - Out-of-Bounds Access in Sparse Reduction Operations

tensorflow-gpu Updated 02 Oct 2025

Summary

12/08/2021
Yes i
Unrated
Not published

CVE-2021-37635: 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 < 87158f43f05f2720a374f3e6d22a7aaa3a33f750

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-37635 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 end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing 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.

Vulnerability Detail

The implementation of sparse reduction operations in TensorFlow GPU versions prior to 2.6.0 can lead to out-of-bounds access in heap allocated data. The issue arises due to the lack of proper validation in the implementation, which fails to check for overflow in reduction groups and index bounds of the input tensor. An attacker could exploit this vulnerability to trigger accesses outside the allocated memory, potentially leading to memory corruption, crashes, or even remote code execution. The vulnerability has been assigned CVE-2021-37635.

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 known workaround for this vulnerability. It is essential to apply the provided fix by upgrading to the patched versions of TensorFlow GPU.

Conclusion

In conclusion, the TensorFlow GPU package prior to version 2.6.0 is vulnerable to out-of-bounds access in sparse reduction operations. This vulnerability can have severe consequences, including memory corruption and potential remote code execution. Users should upgrade to the patched versions of TensorFlow GPU to mitigate the risk. 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 computations.

The vulnerability in TensorFlow GPU can lead to out-of-bounds access in heap allocated data, potentially resulting in memory corruption, crashes, or remote 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, there is no known workaround for this vulnerability. It is crucial to upgrade to the patched versions of TensorFlow GPU.

You can find more information about this vulnerability in the TensorFlow GPU advisory PYSEC-2021-746 at https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow-gpu/PYSEC-2021-746.yaml.

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.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