CVE-2021-37669: Denial of Service Vulnerability in TensorFlow

tensorflow Updated 02 Oct 2025

Summary

25/08/2021
Yes i
Moderate
5.5

CVE-2021-37669: Crash in NMS ops caused by integer conversion to unsigned. Affects tensorflow across 3 version ranges.

< 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-37669 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 open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including computer vision, natural language processing, and deep learning. 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-37669, is caused by a crash in NMS (Non-Maximum Suppression) operations due to an integer conversion to unsigned. An attacker can exploit this vulnerability by triggering a division by 0, resulting in a crash. The issue arises from the use of a user-controlled argument to resize a std::vector in the implementation of tf.raw_ops.NonMaxSuppressionV5 and CombinedNonMaxSuppression. If a negative value is supplied by the attacker, it triggers an implicit conversion to unsigned, leading to a crash. This vulnerability can be exploited to cause a DoS in applications serving models using the affected TensorFlow operations.

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.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"
  • >= 2.5.0, < 2.5.1 2.5.1
    pip install --upgrade "tensorflow==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 update TensorFlow to the patched version.

Conclusion

CVE-2021-37669 is a denial of service vulnerability in TensorFlow that can be exploited by triggering a division by 0. It has been patched in the latest version of TensorFlow (2.6.0) and backported to earlier versions. Users are advised to update their TensorFlow installations to the patched versions to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework developed by Google. It provides tools and resources for building and deploying machine learning models.

The vulnerability can be exploited to cause a denial of service (DoS) in applications serving models using the affected TensorFlow operations.

To fix this vulnerability, update TensorFlow to the latest patched version (2.6.0) or one of the backported versions (2.5.1, 2.4.3, or 2.3.4).

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

For more information regarding TensorFlow security, please consult the TensorFlow security guide.

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.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"
  • >= 2.5.0, < 2.5.1 2.5.1
    pip install --upgrade "tensorflow==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