CVE-2021-29558: TensorFlow Heap Buffer Overflow in tf.raw_ops.SparseSplit

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29558: Heap buffer overflow in SparseSplit. 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-29558 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem for building and deploying machine learning models. TensorFlow is widely used in various industries and research fields.

Vulnerability Detail

The vulnerability identified as CVE-2021-29558 affects TensorFlow versions 0 and above. It specifically targets the tf.raw_ops.SparseSplit function. The vulnerability arises due to a heap buffer overflow caused by accessing an array element based on a user-controlled offset. An attacker can exploit this vulnerability to execute arbitrary code or cause a denial of service (DoS) attack. The impact of this vulnerability can be severe, potentially leading to unauthorized access, data leakage, or system compromise.

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 essential to apply the provided fix or upgrade to a patched version of TensorFlow as soon as possible.

Conclusion

The vulnerability identified as CVE-2021-29558 in TensorFlow poses a significant risk to systems utilizing affected versions. It is crucial to apply the recommended fix or upgrade to a patched version to mitigate the potential impact. 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 a comprehensive ecosystem for building and deploying machine learning models.

The vulnerability can be exploited by an attacker to execute arbitrary code or cause a denial of service (DoS) attack, potentially leading to unauthorized access, data leakage, or system compromise.

The vulnerability affects TensorFlow versions 0 and above. Specifically, versions 2.1.4, 2.2.3, 2.3.3, 2.4.2, and any versions prior to 2.5.0 are vulnerable.

To fix this vulnerability, it is recommended to upgrade to TensorFlow version 2.5.0 or any subsequent version. Alternatively, users of affected versions can update to the respective fixed versions: 2.4.2, 2.3.3, 2.2.3, or 2.1.4.

No, there is no known workaround for this vulnerability. It is crucial to apply the provided fix or upgrade to a patched version of 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