CVE-2021-41199: TensorFlow GPU - Integer Overflow in tf.image.resize

tensorflow-gpu Updated 02 Oct 2025

Summary

05/11/2021
Yes i
Unrated
Not published

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

< 2.4.4 >= 2.5.0, < 2.5.2 >= 2.6.0, < 2.6.1 >= 2.7.0rc0, < 2.7.0 < e5272d4204ff5b46136a1ef1204fc00597e21837

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-41199 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 open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. It is commonly used in deep learning applications that require high-performance computing.

Vulnerability Detail

The vulnerability (CVE-2021-41199) in TensorFlow GPU arises when the tf.image.resize function is called with a large input argument. Due to an integer overflow, the TensorFlow process crashes, triggered by a CHECK-failure. The number of elements in the output tensor exceeds the capacity of the int64_t type, leading to the overflow detection via a CHECK statement. As a result, the process is aborted. This vulnerability can be exploited by an attacker to cause a denial-of-service (DoS) condition in TensorFlow GPU deployments. The issue affects multiple versions of TensorFlow GPU, including 2.4.4, 2.5.2, 2.6.1, and 2.7.0rc0.

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.4.4 2.4.4
    pip install --upgrade "tensorflow-gpu==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow-gpu==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow-gpu==2.6.1"
  • >= 2.7.0rc0, < 2.7.0 2.7.0
    pip install --upgrade "tensorflow-gpu==2.7.0"

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 currently no known workaround for this vulnerability. It is recommended to apply the official fix by upgrading to the patched versions of TensorFlow GPU.

Conclusion

The vulnerability in TensorFlow GPU (CVE-2021-41199) can result in a denial-of-service (DoS) condition when the tf.image.resize function is called with a large input argument. Upgrading to the patched versions of TensorFlow GPU is crucial to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow GPU is a variant of TensorFlow that utilizes GPU acceleration for faster computation in machine learning tasks.

The vulnerability can lead to a denial-of-service (DoS) condition in TensorFlow GPU deployments, potentially disrupting machine learning workflows.

The vulnerability affects TensorFlow GPU versions 2.4.4, 2.5.2, 2.6.1, and 2.7.0rc0.

No, there is currently no known workaround for this vulnerability. It is recommended to upgrade to the patched versions of TensorFlow GPU.

To fix this vulnerability, upgrade to TensorFlow GPU version 2.7.0 or apply the backported fixes in versions 2.6.1, 2.5.2, and 2.4.4.

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.4.4 2.4.4
    pip install --upgrade "tensorflow-gpu==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow-gpu==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow-gpu==2.6.1"
  • >= 2.7.0rc0, < 2.7.0 2.7.0
    pip install --upgrade "tensorflow-gpu==2.7.0"

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