LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37659: Out of bounds read via null pointer dereference in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in all binary cwise operations that don't require broadcasting (e.g., gradients of binary cwise operations). The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/cwise_ops_common.h#L264) assumes that the two inputs have exactly the same number of elements but does not check that. Hence, when the eigen functor executes it triggers heap OOB reads and undefined behavior due to binding to nullptr. We have patched the issue in GitHub commit 93f428fd1768df147171ed674fee1fc5ab8309ec. 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.3Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

TensorFlow versions in the listed ranges can read memory out of bounds when certain element-wise binary operations receive mismatched input sizes. A user able to run or influence TensorFlow computation on an affected system may cause crashes, undefined behavior, and possible information exposure. The vendor fixed it in TensorFlow 2.6.0 and supported patch releases.

Executive priority

Prioritize remediation for shared ML platforms, multi-user notebooks, and services processing untrusted or customer-controlled ML inputs. The issue has high confidentiality and availability impact, but the available evidence does not show confirmed active exploitation. Standard dependency upgrade and image rebuild processes should address most exposure.

Technical view

Binary cwise operations that do not require broadcasting failed to verify equal element counts. The implementation assumed both tensors matched; mismatches could lead the Eigen functor to bind a null pointer, causing heap out-of-bounds reads and undefined behavior. The issue maps to CWE-125 and CWE-476, with CVSS 3.1 score 7.3.

Likely exposure

Exposure is most likely in applications, notebooks, services, or batch jobs using vulnerable TensorFlow versions: below 2.3.4, 2.4.0 to before 2.4.3, or 2.5.0 to before 2.5.1. Risk increases where low-privileged users or tenants can supply TensorFlow graphs, tensors, models, or workloads.

Exploitation context

The CVSS vector is local, low complexity, low privileges, and no user interaction. The provided sources do not report active exploitation, and the CVE is not marked KEV. Treat this as a high-impact local or workload-influenced issue, not as a confirmed internet-exploited vulnerability.

Researcher notes

The vulnerable path is in TensorFlow binary cwise operations without broadcasting. The advisory attributes impact to unchecked element-count assumptions, heap out-of-bounds reads, null pointer reference binding, and undefined behavior. The fixed commit is 93f428fd1768df147171ed674fee1fc5ab8309ec; avoid deriving exploit procedures from the patch in operational reports.

Mitigation direction

  • Upgrade TensorFlow to 2.6.0 or later where feasible.
  • For older supported branches, use 2.5.1, 2.4.3, or 2.3.4.
  • Rebuild containers, notebooks, and runtime images containing vulnerable TensorFlow packages.
  • Pin dependency versions to prevent reintroducing affected TensorFlow builds.
  • Check TensorFlow advisory guidance for environment-specific remediation details.

Validation and detection

  • Inventory TensorFlow versions in source manifests, lockfiles, containers, and deployed ML runtimes.
  • Flag versions below 2.3.4, 2.4.0-2.4.2, and 2.5.0.
  • Confirm runtime images and notebooks load a fixed TensorFlow version.
  • Review user-controlled ML workload paths for affected TensorFlow execution.
  • Run existing regression tests after upgrading TensorFlow.
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-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
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-37659 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.3 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/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.3CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H1.85.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

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

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/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-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.

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.