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

tensorflow-gpu Updated 02 Oct 2025

Summary

14/05/2021
Yes i
Unrated
Not published

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

>= 2.2.0, < 2.3.0rc0 < 2.2.0rc0 >= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3 < b432a38fe0e1b4b904a6c222cbce794c39703e87

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow-GPU is an open-source platform for machine learning that provides a comprehensive ecosystem for developing and deploying machine learning models. It is widely used in various industries and research domains for its powerful capabilities and ease of use. However, a vulnerability has been discovered in TensorFlow-GPU that can lead to a denial of service (DoS) attack.

Vulnerability Detail

The vulnerability (CVE-2021-29533) in TensorFlow-GPU arises from a flaw in the implementation of the tf.raw_ops.DrawBoundingBoxes function. An attacker can trigger a DoS attack by passing an empty image to this function, causing a CHECK failure. The implementation uses CHECK_* assertions instead of OP_REQUIRES to validate user-controlled inputs. While OP_REQUIRES allows returning an error condition to the user, CHECK_* macros result in a program crash if the condition is false. In this case, the height of the image is 0, leading to a negative value for max_box_row_clamp and a falsified assertion, resulting in the program aborting. This vulnerability can be exploited by an attacker to disrupt the availability of TensorFlow-GPU and potentially impact systems relying on it for machine learning tasks.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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.2.0rc0 2.2.0rc0
    pip install --upgrade "tensorflow-gpu==2.2.0rc0"
  • >= 2.2.0, < 2.3.0rc0 2.3.0rc0
    pip install --upgrade "tensorflow-gpu==2.3.0rc0"
  • >= 2.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow-gpu==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow-gpu==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

As a temporary workaround, users can validate the input images before passing them to the tf.raw_ops.DrawBoundingBoxes function. By ensuring that the height of the image is not zero, the vulnerability can be mitigated. Here is an example code snippet demonstrating the workaround:

# Validate image height
if image.shape[0] == 0:
    raise ValueError('Image height cannot be zero')

# Call the DrawBoundingBoxes function
tf.raw_ops.DrawBoundingBoxes(images, ...)

Conclusion

The vulnerability (CVE-2021-29533) in TensorFlow-GPU can lead to a denial of service (DoS) attack by exploiting a flaw in the tf.raw_ops.DrawBoundingBoxes function. It is crucial for users to update their TensorFlow-GPU installations to the latest patched version once it becomes available. In the meantime, a temporary workaround is available by validating input images to mitigate the vulnerability. For further support and assistance in vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow-GPU is an open-source platform for machine learning that provides a comprehensive ecosystem for developing and deploying machine learning models. It leverages the power of GPUs to accelerate the training and inference processes.

This vulnerability can be exploited by an attacker to trigger a denial of service (DoS) attack, leading to the unavailability of TensorFlow-GPU and potentially impacting systems relying on it for machine learning tasks.

The vulnerability will be fixed in TensorFlow-GPU version 2.5.0. Users are advised to update their installations to the latest patched version as soon as it becomes available. Backported fixes will also be provided for earlier supported versions.

Yes, a temporary workaround is to validate the input images before passing them to the vulnerable function. By ensuring that the image height is not zero, the vulnerability can be mitigated.

For more information about this vulnerability, you can refer to the official advisory provided by the TensorFlow-GPU project. Additionally, you can use vulnerability monitoring tools like Vulert to stay updated on the latest security vulnerabilities in your software.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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.2.0rc0 2.2.0rc0
    pip install --upgrade "tensorflow-gpu==2.2.0rc0"
  • >= 2.2.0, < 2.3.0rc0 2.3.0rc0
    pip install --upgrade "tensorflow-gpu==2.3.0rc0"
  • >= 2.3.0, < 2.3.4 2.3.4
    pip install --upgrade "tensorflow-gpu==2.3.4"
  • >= 2.4.0, < 2.4.3 2.4.3
    pip install --upgrade "tensorflow-gpu==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