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

tensorflow Updated 02 Oct 2025

Summary

21/05/2021
Yes i
Low
2.5

CVE-2021-29533: CHECK-fail in DrawBoundingBoxes. Affects tensorflow across 4 version ranges.

< 2.1.4 >= 2.2.0, < 2.2.3 >= 2.3.0, < 2.3.3 >= 2.4.0, < 2.4.2

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-29533 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 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 research, industry, and academia. However, a vulnerability has been discovered in TensorFlow that could lead to a denial of service (DoS) attack.

Vulnerability Detail

The vulnerability, identified as CVE-2021-29533, exists in the DrawBoundingBoxes function of TensorFlow. An attacker can exploit this vulnerability by passing an empty image to the function, triggering a CHECK failure. This vulnerability is caused by the use of CHECK assertions instead of OP_REQUIRES to validate user-controlled inputs. As a result, if the condition is false, the program execution crashes. In this case, when the height of the image is 0, the assertion fails, leading to a DoS condition. An attacker can potentially exploit this vulnerability 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.1.4 2.1.4
    pip install --upgrade "tensorflow==2.1.4"
  • >= 2.2.0, < 2.2.3 2.2.3
    pip install --upgrade "tensorflow==2.2.3"
  • >= 2.3.0, < 2.3.3 2.3.3
    pip install --upgrade "tensorflow==2.3.3"
  • >= 2.4.0, < 2.4.2 2.4.2
    pip install --upgrade "tensorflow==2.4.2"

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. However, users can follow the steps mentioned in the 'how_to_fix' section to update their TensorFlow installations and mitigate the vulnerability.

Conclusion

The vulnerability in TensorFlow (CVE-2021-29533) can be exploited to trigger a denial of service condition in TensorFlow applications. It is crucial for users to update their TensorFlow installations to the latest version once the fix becomes available. Regularly checking for updates and applying them promptly is recommended to ensure the security and stability of TensorFlow applications. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

The vulnerability can be exploited by an attacker to trigger a denial of service condition in TensorFlow applications, leading to unavailability or disruption of the affected systems.

You can use the Vulert Playground at Vulert Scanner to check if your TensorFlow installation is affected by this vulnerability. Simply provide your Pipfile.lock and the playground will analyze it for any open-source vulnerabilities, including CVE-2021-29533.

No, not all versions of TensorFlow are affected. The vulnerability exists in versions 2.1.4, 2.2.3, 2.3.3, and 2.4.2. It has been patched in TensorFlow 2.5.0.

There is no evidence of this vulnerability being exploited in the wild at the time of this report. However, it is important to update TensorFlow installations to the latest version to mitigate the risk.

For more information about TensorFlow security, you can refer to the TensorFlow security guide available at https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md. It provides details about the security model and how to report issues or ask questions.

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.1.4 2.1.4
    pip install --upgrade "tensorflow==2.1.4"
  • >= 2.2.0, < 2.2.3 2.2.3
    pip install --upgrade "tensorflow==2.2.3"
  • >= 2.3.0, < 2.3.3 2.3.3
    pip install --upgrade "tensorflow==2.3.3"
  • >= 2.4.0, < 2.4.2 2.4.2
    pip install --upgrade "tensorflow==2.4.2"

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