CVE-2021-29603: TensorFlow - Out-of-Bounds Write Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29603: Heap OOB write in TFLite. 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-29603 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 applications.

Vulnerability Detail

A vulnerability has been discovered in TensorFlow that allows for an out-of-bounds write on the heap. This vulnerability can be triggered by a specially crafted TFLite model when using the ArgMin/ArgMax functions. If the axis_value parameter is not within the valid range, the code writes beyond the allocated memory, potentially leading to memory corruption and arbitrary code execution. The issue has been assigned CVE-2021-29603 and has a CVSSv3 severity rating of High.

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 apply the provided patches or update to the latest version of TensorFlow as soon as possible.

Conclusion

The discovered vulnerability in TensorFlow could potentially lead to memory corruption and arbitrary code execution. It is crucial for users of TensorFlow to update their installations to the latest patched version or apply the provided patches to mitigate the risk. For further support and assistance with 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 developed by Google. It provides a wide range of tools and libraries for building and deploying machine learning models.

This vulnerability could allow an attacker to execute arbitrary code or cause a denial of service by exploiting the out-of-bounds write issue in TensorFlow.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) and Vulert will analyze it for any known vulnerabilities.

The recommended mitigation is to update to the latest patched version of TensorFlow. This will ensure that the vulnerability is addressed and the risk is minimized.

You can find more information about this vulnerability in the official TensorFlow security advisory (link to be provided). It contains detailed information about the vulnerability, its impact, and the recommended actions to mitigate the risk.

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