CVE-2021-41198: TensorFlow - Crash due to CHECK-failure caused by overflow in tf.tile

tensorflow-cpu Updated 02 Oct 2025

Summary

05/11/2021
Yes i
Unrated
Not published

CVE-2021-41198: TensorFlow is an open source platform for machine learning. Affects tensorflow-cpu 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 < 9294094df6fea79271778eb7e7ae1bad8b5ef98f

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-41198 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 allows users to build and train neural networks, perform data preprocessing and augmentation, and deploy models in various environments. It is widely used in both research and production settings.

Vulnerability Detail

In affected versions of TensorFlow, a vulnerability exists in the tf.tile function. When this function is called with a large input argument, it can cause the TensorFlow process to crash due to a CHECK-failure caused by an overflow. The number of elements in the output tensor exceeds the capacity of the int64_t type, leading to an overflow that is detected by a CHECK statement. As a result, the process is aborted. This vulnerability can be exploited by an attacker to disrupt TensorFlow processes and potentially cause denial-of-service (DoS) conditions. The issue has been identified and fixed in TensorFlow 2.7.0, and the fix has also been backported to TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

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

As a workaround, users can avoid triggering the vulnerability by avoiding the use of large input arguments with the tf.tile function. If possible, alternative approaches or functions can be used to achieve the desired functionality without encountering the overflow issue. However, it is strongly recommended to apply the official fix or update to the latest version of TensorFlow to ensure comprehensive security.

Conclusion

In conclusion, the vulnerability in TensorFlow's tf.tile function can result in a crash of the TensorFlow process due to an overflow issue. This can be exploited by attackers to disrupt TensorFlow processes and potentially cause denial-of-service conditions. It is crucial to update TensorFlow to the latest version or apply the respective patches to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning that provides tools and resources for building and deploying neural networks and other machine learning models.

The vulnerability in TensorFlow can lead to a crash of the TensorFlow process due to an overflow issue. This can potentially be exploited by an attacker to disrupt TensorFlow processes and cause denial-of-service conditions.

The vulnerability affects TensorFlow versions 2.4.4, 2.5.2, 2.6.1, and versions prior to 2.7.0.

Yes, the vulnerability has been fixed in TensorFlow 2.7.0. The fix has also been backported to TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4.

Users can update TensorFlow by either using the package manager to install the updated version or by manually downloading and installing the latest version from the official TensorFlow website.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

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