CVE-2021-29522: TensorFlow - Division by Zero Denial of Service

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-29522: Division by 0 in Conv3DBackprop*. 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-29522 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 end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow is widely used in various industries and research domains due to its flexibility and scalability. 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-29522, resides in the tf.raw_ops.Conv3DBackprop* operations of TensorFlow. These operations fail to validate the input tensors, allowing an attacker to trigger a division by zero error. The issue arises from the implementation of the operations, which does not check if the divisor used in computing the shard size is zero. By controlling the input sizes, an attacker can exploit this vulnerability to cause a denial of service attack.

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 known workaround for this vulnerability. It is crucial to apply the provided fix or update to the patched versions of TensorFlow to ensure the security and stability of the machine learning environment.

Conclusion

The identified vulnerability in TensorFlow can be exploited by an attacker to cause a denial of service attack. To ensure the security and stability of TensorFlow-based machine learning systems, it is crucial to update to the fixed versions of TensorFlow or apply the provided patches. For further support and assistance in 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 resources for developing and deploying machine learning models.

This vulnerability allows an attacker to trigger a division by zero error, leading to a denial of service attack. It can disrupt the availability and functionality of TensorFlow-based machine learning systems.

The vulnerability affects TensorFlow versions 0 and 2.1.4 to 2.4.2. It has been fixed in TensorFlow 2.5.0 and will also be patched in TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3, and TensorFlow 2.1.4.

No, there is no known workaround for this vulnerability. It is essential to update to the fixed versions of TensorFlow to mitigate the risk.

You can find more information about this vulnerability in the official TensorFlow security advisory or by contacting the TensorFlow support team.

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