CVE-2021-37689: TensorFlow - Null Pointer Dereference Denial of Service

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-37689: Null pointer dereference in TensorFlow Lite MLIR optimizations. Affects tensorflow across 3 version ranges.

>= 2.3.0, < 2.3.4 >= 2.4.0, < 2.4.3 >= 2.5.0, < 2.5.1

Fixed in 2.3.4, 2.4.3 or 2.5.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-37689 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various industries and research domains 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 and subsequent denial of service.

Vulnerability Detail

The vulnerability in TensorFlow arises from the MLIR optimization of the L2NormalizeReduceAxis operator. An attacker can exploit this vulnerability by crafting a TFLite model that triggers a null pointer dereference. When the model is processed, the MLIR optimization unconditionally dereferences a pointer to an iterator to a vector without checking if the vector has any elements. This leads to a crash and denial of service. The impact of this vulnerability is the disruption of TensorFlow-based applications, potentially causing downtime and loss of service availability.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.3.0, < 2.3.4 2.3.4
  • >= 2.4.0, < 2.4.3 2.4.3
  • >= 2.5.0, < 2.5.1 2.5.1

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 specific workaround mentioned for this vulnerability. The recommended approach is to apply the provided patches and update to the latest version of TensorFlow.

Conclusion

The discovered vulnerability in TensorFlow can lead to a null pointer dereference and denial of service. It is crucial to promptly update to the latest patched version of TensorFlow (2.6.0, 2.5.1, 2.4.3, or 2.3.4) to mitigate the risk. Regularly checking for updates and applying them is essential to ensure the security and stability of TensorFlow-based applications. 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.

The vulnerability can lead to a null pointer dereference and denial of service, causing crashes and disruption of TensorFlow-based applications.

The vulnerability affects TensorFlow versions 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, 2.5.0, and 2.6.0-rc0 to 2.6.0-rc2.

To fix this vulnerability, update to the latest patched version of TensorFlow (2.6.0, 2.5.1, 2.4.3, or 2.3.4) by upgrading the TensorFlow package.

No specific workaround is mentioned. It is recommended to apply the provided patches and update to the latest 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.3.0, < 2.3.4 2.3.4
  • >= 2.4.0, < 2.4.3 2.4.3
  • >= 2.5.0, < 2.5.1 2.5.1

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