LiveActive security incident?Get immediate response
CVE Record

CVE-2021-29514: Heap out of bounds write in `RaggedBinCount`

TensorFlow is an end-to-end open source platform for machine learning. If the `splits` argument of `RaggedBincount` does not specify a valid `SparseTensor`(https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor), then an attacker can trigger a heap buffer overflow. This will cause a read from outside the bounds of the `splits` tensor buffer in the implementation of the `RaggedBincount` op(https://github.com/tensorflow/tensorflow/blob/8b677d79167799f71c42fd3fa074476e0295413a/tensorflow/core/kernels/bincount_op.cc#L430-L446). Before the `for` loop, `batch_idx` is set to 0. The attacker sets `splits(0)` to be 7, hence the `while` loop does not execute and `batch_idx` remains 0. This then results in writing to `out(-1, bin)`, which is before the heap allocated buffer for the output tensor. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are also affected.

LowCVSS 2.5Not KEV-listedUpdated
Glexia's TakeAutomated analysislow

Security readout for executives and security teams

Plain-English summary

CVE-2021-29514 is a low-severity TensorFlow memory safety issue. A malformed RaggedBincount input can trigger a heap buffer overflow and likely crash the process. Business urgency is limited unless affected TensorFlow workloads accept untrusted tensor inputs or run shared ML services.

Executive priority

Treat as routine patch management unless affected ML services process untrusted inputs. Prioritize shared, user-facing, or multi-tenant TensorFlow environments first because a crash could disrupt availability.

Technical view

TensorFlow RaggedBincount mishandles an invalid splits argument that does not represent a valid SparseTensor. The flawed bounds logic can write before the heap-allocated output tensor buffer. Sources list CWE-787, CVSS 3.1 score 2.5, local attack vector, high complexity, low privileges, and low availability impact.

Likely exposure

Exposure is most likely in applications using TensorFlow versions before 2.3.3 or 2.4.0 through before 2.4.2, especially where users can influence tensors passed to RaggedBincount. Typical internally controlled ML jobs are lower risk.

Exploitation context

The bundle does not show CISA KEV listing or active exploitation. Exploitation requires local, low-privilege access and a crafted invalid input to a specific TensorFlow operation. Reported impact is availability degradation, not confidentiality or integrity loss.

Researcher notes

The public description gives root-cause detail and fixed release targets but no evidence of exploitation in the wild. Validate exposure by version and reachable operation usage. Avoid assuming broader TensorFlow compromise beyond the documented RaggedBincount memory write condition.

Mitigation direction

  • Upgrade to TensorFlow 2.5.0 or a fixed branch release.
  • For 2.4.x, move to TensorFlow 2.4.2 or later.
  • For 2.3.x, move to TensorFlow 2.3.3 or later.
  • Review the TensorFlow advisory for current vendor guidance.
  • Restrict untrusted tensor input paths where upgrade is delayed.

Validation and detection

  • Inventory deployed TensorFlow package versions across services and notebooks.
  • Search code for use of RaggedBincount or ragged bincount wrappers.
  • Confirm affected workloads no longer run vulnerable TensorFlow versions.
  • Review crash logs for unexplained failures in TensorFlow bincount operations.
  • Run regression tests for ML pipelines 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-787: 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-29514 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
Low
CVSS
2.5 (3.1)
Known Exploited
No
Published

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

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
2.5CVSS 3.1LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L11.4Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

2.5Low
CVSS 3.1 vector shape for CVE-2021-29514Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

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.3.3, >= 2.4.0, < 2.4.2Listed
Weakness

CWE details

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

CWE-787 · source CWE mapping

Out-of-bounds Write

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