LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37689: Null pointer dereference in TensorFlow Lite MLIR optimizations

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service. This is caused by the MLIR optimization of `L2NormalizeReduceAxis` operator. The [implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/compiler/mlir/lite/transforms/optimize.cc#L67-L70) unconditionally dereferences a pointer to an iterator to a vector without checking that the vector has elements. We have patched the issue in GitHub commit d6b57f461b39fd1aa8c1b870f1b974aac3554955. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A malicious TensorFlow Lite model can crash affected TensorFlow processing when a specific optimization runs. The business impact is denial of service in systems or pipelines that accept or process untrusted TFLite models. The sources do not show active exploitation.

Executive priority

Prioritize remediation where TensorFlow processes external models or supports production ML services. Internal-only research environments are lower urgency but should still be upgraded through normal patch cycles.

Technical view

CVE-2021-37689 is a CWE-476 null pointer dereference in TensorFlow Lite MLIR optimization for L2NormalizeReduceAxis. A crafted TFLite model can trigger an unchecked dereference and crash the process. Fixed code is identified in commit d6b57f461b39fd1aa8c1b870f1b974aac3554955.

Likely exposure

Exposure is most likely in applications, CI/CD, model ingestion services, or ML tooling using affected TensorFlow versions and processing attacker-supplied or third-party TFLite models.

Exploitation context

The CVE is not listed as KEV, and the provided sources do not claim active exploitation. The attack requires a crafted TFLite model reaching the affected optimization path.

Researcher notes

Root cause is an unconditional dereference of a pointer to a vector iterator without verifying that elements exist. The sources identify the operator, affected version ranges, and fixing commit, but do not provide exploit code, public exploitation, or downstream product impact.

Mitigation direction

  • Upgrade TensorFlow to 2.6.0 or a fixed supported branch release.
  • Use TensorFlow 2.5.1, 2.4.3, or 2.3.4 where those branches are required.
  • If building from source, ensure the referenced fixing commit is included.
  • Restrict processing of untrusted TFLite models until affected environments are patched.
  • Check TensorFlow vendor guidance for downstream package or platform-specific instructions.

Validation and detection

  • Inventory TensorFlow versions in applications, containers, notebooks, and build pipelines.
  • Check dependency manifests and SBOMs for affected version ranges.
  • Identify workflows that ingest third-party or user-provided TFLite models.
  • Confirm patched environments no longer use vulnerable TensorFlow builds.
  • Review service monitoring for unexplained crashes in TFLite model processing paths.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-476: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-37689 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2021-37689Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
tensorflowtensorflow>= 2.5.0, < 2.5.1, >= 2.4.0, < 2.4.3, < 2.3.4Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-476 · source CWE mapping

NULL Pointer Dereference

NULL Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.