CVE-2021-29528: TensorFlow - Division by 0 in QuantizedMul

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-29528: Division by 0 in QuantizedMul. 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-29528 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 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 for tasks such as image recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to a division by 0 in the tf.raw_ops.QuantizedMul function.

Vulnerability Detail

The vulnerability arises from a division operation in the implementation of tf.raw_ops.QuantizedMul that is susceptible to a division by 0. An attacker can exploit this vulnerability by controlling the divisor, leading to a potential crash or undefined behavior. The impact of this vulnerability can vary depending on the context in which TensorFlow is used. In certain scenarios, it could allow an attacker to disrupt the execution of machine learning models or cause unexpected behavior.

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

As this vulnerability is related to a specific function in TensorFlow, there is no general workaround available. Users are advised to follow the recommended steps for fixing the vulnerability by updating to the patched versions of TensorFlow.

Conclusion

The division by 0 vulnerability in TensorFlow's tf.raw_ops.QuantizedMul function can pose a risk to the stability and integrity of machine learning models. It is crucial to update to the patched versions of TensorFlow as soon as they are available to mitigate the potential impact. 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 libraries for developing and deploying machine learning models.

The vulnerability can lead to a division by 0 in certain TensorFlow operations, potentially causing crashes or unexpected behavior in machine learning models.

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 update to the latest version of TensorFlow once the fix is available. Patch releases will also be provided for the affected versions.

You can find more information about this vulnerability in the TensorFlow release notes and security advisories.

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