LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37651: Heap buffer overflow in `FractionalAvgPoolGrad` in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation for `tf.raw_ops.FractionalAvgPoolGrad` can be tricked into accessing data outside of bounds of heap allocated buffers. The [implementation](https://github.com/tensorflow/tensorflow/blob/f24faa153ad31a4b51578f8181d3aaab77a1ddeb/tensorflow/core/kernels/fractional_avg_pool_op.cc#L205) does not validate that the input tensor is non-empty. Thus, code constructs an empty `EigenDoubleMatrixMap` and then accesses this buffer with indices that are outside of the empty area. We have patched the issue in GitHub commit 0f931751fb20f565c4e94aa6df58d54a003cdb30. 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.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A flaw in TensorFlow’s FractionalAvgPoolGrad operation can access memory outside expected heap buffer boundaries when given an empty input. It matters most where users or workloads can run TensorFlow operations with limited privileges. The vendor patched it and named fixed releases; there is no source evidence of active exploitation.

Executive priority

Treat this as a high-priority patching issue for ML infrastructure, especially shared environments. It is not described as internet-exploitable in the provided sources, but the impact rating is high because successful abuse can affect confidentiality and integrity.

Technical view

Affected TensorFlow versions fail to validate that the input tensor to `tf.raw_ops.FractionalAvgPoolGrad` is non-empty. This can create an empty Eigen matrix map and then access it out of bounds. The advisory rates it CVSS 7.1 with local access and low privileges required.

Likely exposure

Exposure is limited to TensorFlow deployments on affected versions: 2.5.0 before 2.5.1, 2.4.x before 2.4.3, and versions before 2.3.4. Risk is higher in shared ML notebooks, pipelines, or services where low-privileged users can run TensorFlow workloads.

Exploitation context

The provided sources do not show active exploitation, and CISA KEV status is false. Exploitation requires local access and low privileges, with no user interaction. The source material does not provide evidence of remote exploitation or public weaponization.

Researcher notes

The root cause is missing validation for empty input before constructing and indexing an Eigen matrix map in the gradient kernel. The fix is identified as TensorFlow commit 0f931751fb20f565c4e94aa6df58d54a003cdb30 and was scheduled for 2.6.0 plus supported branch cherry-picks.

Mitigation direction

  • Upgrade TensorFlow to 2.6.0 or a patched supported release.
  • Use TensorFlow 2.5.1, 2.4.3, or 2.3.4 where those branches are required.
  • Inventory ML runtimes, containers, notebooks, and batch images for affected TensorFlow versions.
  • Check TensorFlow advisory guidance before relying on compensating controls.
  • Prioritize shared or multi-user ML environments first.

Validation and detection

  • Compare installed TensorFlow versions against the affected version ranges.
  • Confirm production images rebuild with patched TensorFlow packages.
  • Identify workloads using `tf.raw_ops.FractionalAvgPoolGrad` or related fractional average pooling gradients.
  • Review shared ML platforms for users able to run arbitrary TensorFlow operations.
  • Verify dependency lockfiles and container manifests no longer pin affected releases.
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
cve · low confidence lookup

CVE-2021-37651 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.1 (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: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
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.1CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N1.85.2Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.1High
CVSS 3.1 vector shape for CVE-2021-37651Attack 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: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.