CVE-2021-37661: TensorFlow Denial of Service Vulnerability

tensorflow Updated 02 Oct 2025

Summary

12/08/2021
Yes i
Moderate
5.5

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

>= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3 < 8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992

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-37661 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 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 is widely used in various industries and research domains for tasks such as image recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to a denial of service (DoS) attack.

Vulnerability Detail

The vulnerability, identified as CVE-2021-37661, exists in the boosted_trees_create_quantile_stream_resource function of TensorFlow. By providing negative arguments to this function, an attacker can trigger a DoS condition. The implementation of the function fails to validate that the num_streams parameter only contains non-negative numbers. Consequently, this value is used to allocate memory, leading to a crash in the standard library. This vulnerability can be exploited remotely by an attacker to disrupt the availability of TensorFlow applications.

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 specific workaround provided for this vulnerability. It is advised to update to the patched version of TensorFlow as soon as it is released.

Conclusion

The vulnerability in TensorFlow can result in a denial of service attack, impacting the availability of TensorFlow applications. It is crucial to update to the patched version of TensorFlow once it is released to mitigate the risk. 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 tools and libraries for developing and deploying machine learning models.

This vulnerability can be exploited by an attacker to cause a denial of service, leading to the unavailability of TensorFlow applications.

To fix this vulnerability, it is recommended to update to the latest version of TensorFlow once the fix is available.

Yes, older versions of TensorFlow, including 2.3.4, 2.4.3, and 2.5.1, are also affected by this vulnerability.

No specific workaround has been provided for this vulnerability. Updating to the patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

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