CVE-2021-29582: TensorFlow - Heap-Based Read Out-of-Bounds in Dequantize

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29582: Heap OOB read in tf.raw_ops.Dequantize. 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-29582 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 building and deploying machine learning models. TensorFlow is widely used in various industries and research domains.

Vulnerability Detail

The vulnerability (CVE-2021-29582) in TensorFlow arises from a lack of validation in the tf.raw_ops.Dequantize function. This vulnerability allows an attacker to trigger a read from outside the bounds of heap allocated data. The issue occurs due to the parallel access of the min_range and max_range tensors without verifying that they have the same shape. As a result, an attacker can exploit this flaw to read sensitive information or cause a denial of service. The vulnerability has been assigned a CVSSv3 score of 8.8 (High severity).

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

No workaround has been provided for this vulnerability.

Conclusion

The vulnerability (CVE-2021-29582) in TensorFlow can be mitigated by upgrading to the latest available version. It is recommended to promptly update TensorFlow installations to ensure the security and stability of machine learning models. For further assistance or support 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, widely used for building and deploying machine learning models.

This vulnerability allows an attacker to read data from outside the bounds of heap allocated memory, potentially leading to information disclosure or denial of service.

Versions 0.x, 2.1.4, 2.2.3, 2.3.3, and 2.4.2 of TensorFlow are affected by this vulnerability.

Yes, the vulnerability has been fixed in TensorFlow versions 2.5.0, 2.4.2, 2.3.3, 2.2.3, and 2.1.4.

To upgrade TensorFlow, follow the official upgrade guide provided by TensorFlow.

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