CVE-2021-29534: TensorFlow - CHECK-fail in SparseConcat

tensorflow Updated 02 Oct 2025

Summary

21/05/2021
Yes i
Low
2.5

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 Penetration testing for web, API and mobile 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 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 identified in TensorFlow that could lead to a denial of service (DoS) attack.

Vulnerability Detail

The vulnerability, identified as CVE-2021-29534, exists in the SparseConcat function of TensorFlow. An attacker can exploit this vulnerability by providing specific input values that trigger a CHECK-fail in the function. This CHECK-fail occurs when the function attempts to calculate the output shape using the values specified in the 'shapes' argument. If the addition of a dimension from the argument results in an overflow, the CHECK operation triggers and leads to a denial of service. The vulnerability has a CVSS score of 2.5, indicating a low severity level.

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

No specific workaround has been provided for this vulnerability. Users are advised to update their TensorFlow installations to the fixed versions mentioned above.

Conclusion

The vulnerability in TensorFlow's SparseConcat function can be exploited to trigger a denial of service attack. Users are advised to update their TensorFlow installations to the fixed versions mentioned above. Regularly updating TensorFlow to the latest stable version is recommended to ensure the security of machine learning models. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

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.

The vulnerability in TensorFlow can be exploited by an attacker to trigger a denial of service (DoS) attack. This can lead to the unavailability or disruption of TensorFlow-based applications or services.

To fix this vulnerability, users should update their TensorFlow installations to one of the fixed versions: TensorFlow 2.1.4, TensorFlow 2.2.3, TensorFlow 2.3.3, or TensorFlow 2.4.2. It is recommended to regularly update TensorFlow to the latest stable version.

No specific workaround has been provided for this vulnerability. Updating to the fixed versions of TensorFlow is the recommended solution.

For more information regarding TensorFlow security, you can refer to the TensorFlow security guide available on the official TensorFlow GitHub repository.

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