CVE-2021-29530: TensorFlow - Null Pointer Dereference in SparseMatrixSparseCholesky

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-29530: Invalid validation in SparseMatrixSparseCholesky. 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-29530 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 set of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various industries and research fields for tasks such as image recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to a null pointer dereference in the tf.raw_ops.SparseMatrixSparseCholesky function.

Vulnerability Detail

The vulnerability arises from a lack of proper input validation in the implementation of tf.raw_ops.SparseMatrixSparseCholesky. When an attacker provides an invalid permutation argument, a null pointer dereference occurs. Although there are checks in place, the code does not handle the failure of these checks correctly. As a result, the code proceeds to the next line, leading to the null pointer dereference. This vulnerability can be exploited by an attacker to cause a denial of service or potentially execute arbitrary code in the context of the affected application.

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 provided by the TensorFlow project.

Conclusion

In conclusion, the vulnerability in TensorFlow's tf.raw_ops.SparseMatrixSparseCholesky function can lead to a null pointer dereference, potentially resulting in a denial of service or arbitrary code execution. It is crucial to update to the latest patched version of TensorFlow to mitigate this vulnerability. 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 tools and libraries for building and deploying machine learning models.

A null pointer dereference occurs when a program attempts to access or manipulate memory using a null pointer, resulting in a crash or undefined behavior.

This vulnerability can be exploited by an attacker to cause a denial of service or potentially execute arbitrary code in the context of the affected application.

To fix this vulnerability, it is recommended to update to the latest patched version of TensorFlow (2.5.0 or later).

Yes, older versions of TensorFlow (2.4.2, 2.3.3, 2.2.3, and 2.1.4) are also affected by this vulnerability. It is recommended to update to the latest patched version.

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