LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37668: Division by zero in TensorFlow Lite `tf.raw_ops.UnravelIndex`

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause denial of service in applications serving models using `tf.raw_ops.UnravelIndex` by triggering a division by 0. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/unravel_index_op.cc#L36) does not check that the tensor subsumed by `dims` is not empty. Hence, if one element of `dims` is 0, the implementation does a division by 0. We have patched the issue in GitHub commit a776040a5e7ebf76eeb7eb923bf1ae417dd4d233. 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

This issue can crash affected TensorFlow applications that process models using `tf.raw_ops.UnravelIndex`. It is an availability risk, not a data theft or privilege escalation issue. Business urgency depends on whether vulnerable TensorFlow versions are used in model-serving paths that process untrusted inputs.

Executive priority

Treat as a moderate availability issue. Patch during the next controlled maintenance window, faster for customer-facing ML services or shared platforms where a crash could interrupt production workloads.

Technical view

Affected TensorFlow versions fail to reject an invalid `dims` tensor for `tf.raw_ops.UnravelIndex`. If a dimension value is zero, the kernel can divide by zero and cause denial of service. The vendor patched this in commit a776040a and included fixes in TensorFlow 2.6.0, 2.5.1, 2.4.3, and 2.3.4.

Likely exposure

Exposure is likely limited to environments running affected TensorFlow versions and executing models or code paths that use `tf.raw_ops.UnravelIndex`. The CVSS vector indicates local access and low privileges, with high availability impact and no confidentiality or integrity impact.

Exploitation context

The provided sources do not show public exploitation or CISA KEV listing. The advisory describes denial of service through malformed dimensions reaching the vulnerable operation. No exploit steps should be inferred from the sources.

Researcher notes

The root cause is missing validation that `dims` is non-empty and contains no zero dimension before division. The source bundle ties the issue to CWE-369 and TensorFlow commit a776040a. Evidence is sufficient for affected-version validation, but not for claims of active exploitation.

Mitigation direction

  • Upgrade TensorFlow to 2.6.0, 2.5.1, 2.4.3, 2.3.4, or later supported versions.
  • Apply vendor guidance if pinned dependencies prevent immediate TensorFlow upgrades.
  • Restrict untrusted model execution or tensor inputs reaching affected TensorFlow Lite paths.
  • Prioritize exposed model-serving systems where crashes affect customer-facing availability.

Validation and detection

  • Inventory TensorFlow versions across ML services, containers, build manifests, and notebooks.
  • Review models and code for `tf.raw_ops.UnravelIndex` usage.
  • Confirm deployed versions are not in the affected ranges listed by TensorFlow.
  • Check service reliability logs for crashes in TensorFlow unravel index handling.
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-369: 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-37668 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:N/I:N/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
5.5CVSS 3.1MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H1.83.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

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

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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-369 · source CWE mapping

Divide By Zero

Divide By Zero represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.