CVE-2021-37661: TensorFlow Denial of Service Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-37661: Crash caused by integer conversion to unsigned in TensorFlow. Affects tensorflow across 3 version ranges.

>= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3 >= 2.5.0, < 2.5.1

Fixed in 2.3.4, 2.4.3 or 2.5.1, 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 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 developing and deploying machine learning models. TensorFlow is widely used in various industries and research fields 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, but since reserve receives an unsigned integer, a negative value is implicitly converted to a large positive unsigned value. This results in a crash from the standard library. The impact of this vulnerability can be severe, as it can disrupt the availability of TensorFlow-based applications and services.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.3.0, < 2.3.4 2.3.4
  • >= 2.4.0, < 2.4.3 2.4.3
  • >= 2.5.0, < 2.5.1 2.5.1

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 solution is to apply the patch or update to the fixed versions of TensorFlow.

Conclusion

The vulnerability in TensorFlow can lead to a denial of service (DoS) attack by exploiting the boosted_trees_create_quantile_stream_resource function. It is crucial for users of TensorFlow to update their installations to the patched versions or apply the provided fix 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 a comprehensive set of tools and libraries for developing and deploying machine learning models.

The vulnerability can lead to a denial of service (DoS) condition in TensorFlow, causing disruptions in the availability of applications and services that rely on TensorFlow.

To fix this vulnerability, update your TensorFlow installation to the patched versions: TensorFlow 2.6.0, TensorFlow 2.5.1, TensorFlow 2.4.3, or TensorFlow 2.3.4.

No specific workaround is provided for this vulnerability. Applying the patch or updating to the fixed versions is the recommended solution.

You can find more information about this vulnerability in the GitHub commit 8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992 and the associated CVE-2021-37661.

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

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.3.0, < 2.3.4 2.3.4
  • >= 2.4.0, < 2.4.3 2.4.3
  • >= 2.5.0, < 2.5.1 2.5.1

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