LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37687: Heap OOB in TensorFlow Lite's `Gather*` implementations

TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. 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.

MediumCVSS 5.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-37687 is a TensorFlow Lite information disclosure flaw. A specially crafted model can trigger out-of-bounds heap reads in Gather and GatherNd handling, potentially exposing sensitive process memory. The known impact is confidentiality only, and the source bundle does not show active exploitation.

Executive priority

Treat as moderate priority. Patch during the normal security cycle, with faster handling for products or services that ingest external ML models. The main business risk is unintended disclosure of process memory from systems running affected TensorFlow Lite code.

Technical view

TFLite GatherNd and Gather did not validate negative indices in affected TensorFlow versions. That missing bounds check can cause heap out-of-bounds reads, classified as CWE-125. CVSS 3.1 is 5.5, with local attack vector, low complexity, low privileges, no user interaction, and high confidentiality impact.

Likely exposure

Exposure is most likely where affected TensorFlow versions process TensorFlow Lite models, especially third-party or user-supplied models. Listed affected ranges include TensorFlow 2.5.0 before 2.5.1, 2.4.x before 2.4.3, and versions before 2.3.4.

Exploitation context

The advisory describes attacker control through a crafted model containing negative index values. The bundle marks CISA KEV as false and provides no cited evidence of active exploitation, public weaponization, or exploitation in the wild.

Researcher notes

Focus review on TFLite Gather and GatherNd negative index handling and fixed-version verification. Evidence supports heap out-of-bounds read only; integrity and availability impact are not described. Do not assume active exploitation without additional sourced evidence.

Mitigation direction

  • Upgrade to TensorFlow 2.6.0 or fixed supported patch releases.
  • Use TensorFlow 2.5.1, 2.4.3, or 2.3.4 where staying on older branches.
  • Restrict untrusted TFLite model ingestion until affected environments are patched.
  • Review vendor advisory and patch commits for implementation-specific guidance.

Validation and detection

  • Inventory TensorFlow versions in source, lockfiles, images, and deployed ML services.
  • Identify workloads that load TensorFlow Lite models from external or user-controlled sources.
  • Confirm deployed versions are outside the affected ranges listed in the advisory.
  • Run regression tests for TFLite model loading after upgrading.
Prepared
Confidence
high
Sources
5

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-125: 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-37687 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
Medium
CVSS
5.5 (3.1)
Known Exploited
No
Published

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

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
4Source 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
5.5CVSS 3.1MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N1.83.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.5Medium
CVSS 3.1 vector shape for CVE-2021-37687Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

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-125 · source CWE mapping

Out-of-bounds Read

Out-of-bounds Read represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.