CVE-2021-37655: TensorFlow - Out-of-Bounds Read Vulnerability

tensorflow Updated 02 Oct 2025

Summary

12/08/2021
Yes i
High
7.3

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

< 01cff3f986259d661103412a20745928c727326f >= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3

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-37655 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 community resources that enable researchers and developers to build and deploy machine learning models. TensorFlow is widely used in various domains, including computer vision, natural language processing, and deep learning.

Vulnerability Detail

The vulnerability identified as CVE-2021-37655 affects TensorFlow versions 2.3.0 and above. It resides in the tf.raw_ops.ResourceScatterUpdate function, which is responsible for updating resource tensors. By sending invalid arguments to this function, an attacker can trigger a read from outside the bounds of heap allocated data. The issue arises due to incomplete validation of the relationship between the shapes of indices and updates. Instead of checking that the shape of indices is a prefix of the shape of updates, the code only verifies that the number of elements in these two tensors are in a divisibility relationship. This oversight allows an attacker to exploit the vulnerability and potentially access sensitive information or execute arbitrary code.

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.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow==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 crucial to apply the provided fix or update to the patched versions as soon as possible.

Conclusion

The vulnerability in TensorFlow (CVE-2021-37655) poses a significant risk to systems utilizing affected versions. It is crucial to apply the provided fix or update to the patched versions to mitigate the potential impact. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning that provides a comprehensive set of tools and libraries for building and deploying machine learning models.

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

The vulnerability affects TensorFlow versions 2.3.0 and above.

Yes, the TensorFlow team has addressed the vulnerability in the following versions: TensorFlow 2.6.0, TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4.

To update TensorFlow, you can use the appropriate package manager command, such as pip install --upgrade tensorflow==2.5.1.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

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