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

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-29534: CHECK-fail in SparseConcat. 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-29534 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 end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and community resources that enable researchers and developers to build and deploy machine learning models. TensorFlow is widely used in various industries and applications, including image and speech recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to a denial of service attack.

Vulnerability Detail

The vulnerability, identified as CVE-2021-29534, resides in the tf.raw_ops.SparseConcat function of TensorFlow. By exploiting this vulnerability, an attacker can trigger a denial of service by causing a CHECK-fail in the implementation. The issue arises from the usage of the TensorShape constructor, which relies on the InitDims function. If InitDims returns a non-OK status, a CHECK operation is triggered, leading to a denial of service. The vulnerability affects multiple versions of TensorFlow, including 2.1.4, 2.2.3, 2.3.3, and 2.4.2.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.1.4 2.1.4
  • >= 2.2.0, < 2.2.3 2.2.3
  • >= 2.3.0, < 2.3.3 2.3.3
  • >= 2.4.0, < 2.4.2 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 available for this vulnerability. It is recommended to apply the patch provided by TensorFlow to mitigate the risk of a denial of service attack.

Conclusion

The vulnerability in TensorFlow can lead to a denial of service attack. It is crucial for users to upgrade to the patched version of TensorFlow to mitigate the risk. Additionally, utilizing vulnerability management tools like Vulert can help in monitoring and alerting for open-source vulnerabilities in software. 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 platform for machine learning that provides a comprehensive set of tools and libraries for building and deploying machine learning models.

This vulnerability can be exploited by an attacker to trigger a denial of service attack, potentially disrupting the availability of TensorFlow-based applications.

The vulnerability affects TensorFlow versions 2.1.4, 2.2.3, 2.3.3, and 2.4.2.

To fix this vulnerability, it is recommended to upgrade to TensorFlow version 2.5.0 or any subsequent versions that include the fix. Follow the official upgrade instructions provided by TensorFlow.

There are no specific workarounds available for this vulnerability. Applying the patch provided by TensorFlow is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.1.4 2.1.4
  • >= 2.2.0, < 2.2.3 2.2.3
  • >= 2.3.0, < 2.3.3 2.3.3
  • >= 2.4.0, < 2.4.2 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