CVE-2021-29615: TensorFlow - Stack Overflow Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-29615: Stack overflow in ParseAttrValue with nested tensors. 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-29615 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 domains, including research, industry, and academia. However, a vulnerability has been discovered in the implementation of the ParseAttrValue function, which can lead to a stack overflow due to recursion. This vulnerability affects versions 0.0.0 to 2.1.3, 2.2.0 to 2.2.2, 2.3.0 to 2.3.2, and 2.4.0 to 2.4.1 of TensorFlow.

Vulnerability Detail

The ParseAttrValue function in TensorFlow can be exploited by providing a specially crafted input, causing a stack overflow due to recursive calls. An attacker can leverage this vulnerability to execute arbitrary code or cause a denial-of-service (DoS) condition. The impact of this vulnerability can range from unauthorized access to sensitive information to the complete compromise of the affected system. It is important to note that this vulnerability affects multiple versions of TensorFlow, making it crucial for users to update to the fixed versions.

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 highly recommended to update TensorFlow to the fixed versions as soon as possible.

Conclusion

In conclusion, the stack overflow vulnerability in TensorFlow's ParseAttrValue function can have serious security implications. It is crucial for users to update their TensorFlow installations to the fixed versions to mitigate the risk of exploitation. 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, providing tools and resources for developing and deploying machine learning models.

This vulnerability can lead to a stack overflow, potentially allowing an attacker to execute arbitrary code or cause a denial-of-service condition.

Versions 0.0.0 to 2.1.3, 2.2.0 to 2.2.2, 2.3.0 to 2.3.2, and 2.4.0 to 2.4.1 of TensorFlow are affected.

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

Users can update TensorFlow by following the official documentation and guidelines provided by the TensorFlow project.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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