LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37692: Segfault on strings tensors with mistmatched dimensions in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions under certain conditions, Go code can trigger a segfault in string deallocation. For string tensors, `C.TF_TString_Dealloc` is called during garbage collection within a finalizer function. However, tensor structure isn't checked until encoding to avoid a performance penalty. The current method for dealloc assumes that encoding succeeded, but segfaults when a string tensor is garbage collected whose encoding failed (e.g., due to mismatched dimensions). To fix this, the call to set the finalizer function is deferred until `NewTensor` returns and, if encoding failed for a string tensor, deallocs are determined based on bytes written. We have patched the issue in GitHub commit 8721ba96e5760c229217b594f6d2ba332beedf22. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, which is the other affected version.

MediumCVSS 5.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-37692 is a TensorFlow availability issue. In affected versions, certain Go-created string tensors with mismatched dimensions can crash the process during garbage collection. The impact is service disruption, not data theft or privilege escalation, based on the provided CVSS and advisory data.

Executive priority

Prioritize remediation where TensorFlow Go services process externally influenced data and availability matters. This is not presented as a remote takeover or data exposure issue, but a crash in production ML services can still affect operations and customer-facing reliability.

Technical view

TensorFlow’s Go tensor handling could call C.TF_TString_Dealloc from a finalizer before failed string tensor encoding was safely accounted for. If encoding failed, such as from mismatched dimensions, later garbage collection could segfault. The fix defers finalizer setup until NewTensor succeeds and adjusts deallocation after encoding failure.

Likely exposure

Exposure is most likely in applications using TensorFlow 2.5.0 through the Go API to create string tensors. Systems that do not use TensorFlow Go bindings, do not create string tensors, or run fixed TensorFlow releases are less likely to be affected.

Exploitation context

The source bundle does not show active exploitation, and KEV is false. The CVSS vector is local, low complexity, low privilege, no user interaction, with high availability impact. Treat this primarily as a denial-of-service risk where untrusted or faulty local inputs can reach TensorFlow tensor construction.

Researcher notes

The vulnerable behavior is tied to finalizer-based string tensor cleanup after failed encoding. The provided fix changes finalizer timing and deallocation accounting. Evidence is strongest for TensorFlow 2.5.0; do not broaden affected products or exploit status beyond the provided advisory data.

Mitigation direction

  • Upgrade TensorFlow to 2.5.1 or 2.6.0 or later fixed releases.
  • Check the TensorFlow advisory for any branch-specific vendor guidance.
  • Reduce exposure of Go paths that construct string tensors from untrusted input.
  • Add input validation around tensor dimensions before TensorFlow object creation.

Validation and detection

  • Inventory deployed TensorFlow versions and identify any 2.5.0 installations.
  • Confirm whether applications use TensorFlow Go APIs with string tensors.
  • Review crash logs for TensorFlow string tensor deallocation segfaults.
  • Run regression tests for invalid string tensor dimensions expecting graceful failure.
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-20: 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-37692 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
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: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-37692Attack 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.1Listed
Weakness

CWE details

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

CWE-20 · source CWE mapping

Improper Input Validation

Improper Input Validation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.