CVE-2021-29592: TensorFlow Reshape Operator Null Buffer Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29592: Null pointer dereference in TFLite's Reshape operator. 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-29592 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 for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. The Reshape operator in TensorFlow allows users to reshape tensors to different dimensions. This vulnerability specifically affects the Reshape operator when the target shape is given by the elements of a 1-D tensor.

Vulnerability Detail

The fix for CVE-2020-15209 missed the case when the target shape of the Reshape operator is given by the elements of a 1-D tensor. This oversight allows passing a null-buffer-backed tensor with a 1D shape. An attacker could exploit this vulnerability to cause a denial of service (DoS) or potentially execute arbitrary code. The vulnerability has been assigned 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 official fix by upgrading to the patched versions of TensorFlow.

Conclusion

The TensorFlow Reshape Operator Null Buffer Vulnerability allows an attacker to exploit the Reshape operator when the target shape is given by the elements of a 1-D tensor. This can lead to a denial of service (DoS) or potential code execution. Users should upgrade their TensorFlow installations to the patched versions or apply the official fix as soon as possible. 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 Reshape operator in TensorFlow allows users to reshape tensors to different dimensions.

This vulnerability allows an attacker to cause a denial of service (DoS) or potentially execute arbitrary code.

This vulnerability has been assigned a CVSSv3 severity rating of High.

To fix this vulnerability, upgrade your TensorFlow installation to version 2.5.0 or later. If you are using an older version, upgrade to the respective patched versions.

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