CVE-2021-29547: TensorFlow - Out-of-Bounds Access in QuantizedBatchNormWithGlobalNormalization

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-29547: Heap out of bounds in QuantizedBatchNormWithGlobalNormalization. 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-29547 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 set of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. However, a vulnerability has been discovered in TensorFlow that can lead to a denial of service attack.

Vulnerability Detail

The vulnerability (CVE-2021-29547) in TensorFlow arises from an out-of-bounds access issue in the tf.raw_ops.QuantizedBatchNormWithGlobalNormalization function. The implementation assumes that the inputs are not empty, but if any of the inputs is empty, accessing the element at index 0 results in accessing data outside of bounds. This can cause a segmentation fault and lead to a denial of service. The vulnerability affects versions 0 and 2.1.4 to 2.4.2 of the TensorFlow package.

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 recommended to update to the fixed versions of TensorFlow as soon as they are available.

Conclusion

The vulnerability in TensorFlow (CVE-2021-29547) can lead to a denial of service attack. Users are advised to update their TensorFlow installations to the fixed versions as soon as they are available. Regularly checking for updates and applying them promptly is recommended to ensure the security of TensorFlow deployments. 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 tools and resources for developing and deploying machine learning models.

The vulnerability can lead to a denial of service attack by causing a segmentation fault in TensorFlow.

Versions 0 and 2.1.4 to 2.4.2 of TensorFlow are affected by this vulnerability.

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

Once the fixed versions are available, you can update your TensorFlow installation by following the official documentation and guidelines provided by the TensorFlow project.

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