LiveActive security incident?Get immediate response
CVE Record

CVE-2021-29512: Heap buffer overflow 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-L433). Before the `for` loop, `batch_idx` is set to 0. The user controls the `splits` array, making it contain only one element, 0. Thus, the code in the `while` loop would increment `batch_idx` and then try to read `splits(1)`, which is outside of bounds. 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

This TensorFlow flaw can let a low-privileged local attacker crash or disrupt a vulnerable machine-learning workload by supplying malformed input to RaggedBincount. Sources show low severity and limited availability impact, not data theft or tampering.

Executive priority

Treat this as routine patch management unless vulnerable TensorFlow workloads process untrusted local inputs in shared environments. The main business risk is service disruption, not compromise of sensitive data.

Technical view

CVE-2021-29512 is a heap buffer overflow/out-of-bounds read in TensorFlow RaggedBincount when the splits argument does not represent a valid SparseTensor. A user-controlled splits array can cause the kernel to read beyond the splits tensor buffer. Affected versions are TensorFlow 2.3.x before 2.3.3 and 2.4.x before 2.4.2.

Likely exposure

Exposure is limited to TensorFlow 2.3.x before 2.3.3 or 2.4.x before 2.4.2 where a local user or workload can supply tensors to RaggedBincount. The bundle does not identify other affected products or remote-only exposure.

Exploitation context

The CVSS vector requires local access, low privileges, high complexity, and no user interaction. The bundle and KEV flag do not support active exploitation. Expected impact is low availability loss, with no stated confidentiality or integrity impact.

Researcher notes

The root issue is missing validation around RaggedBincount splits handling. The described edge case lets batch_idx advance and read splits(1) when the user-controlled splits buffer contains only one element. Evidence for exploitation in the wild is absent from the supplied sources.

Mitigation direction

  • Upgrade to TensorFlow 2.5.0, or patched 2.4.2/2.3.3 where those branches are used.
  • Prioritize workloads that process untrusted tensors, models, or user-controlled machine-learning inputs.
  • Check TensorFlow vendor guidance for branch-specific fixes and deployment constraints.
  • Restrict untrusted local users and jobs from invoking vulnerable TensorFlow workloads until upgraded.

Validation and detection

  • Inventory TensorFlow versions in applications, notebooks, containers, and training pipelines.
  • Flag TensorFlow 2.3.x below 2.3.3 and 2.4.x below 2.4.2 as vulnerable.
  • Identify code paths or dependencies that use RaggedBincount with externally influenced inputs.
  • Confirm patched versions are deployed in runtime images, not only development environments.
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-120: 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-29512 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-29512Attack 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.0, < 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-120 · source CWE mapping

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.