LiveActive security incident?Get immediate response
CVE Record

CVE-2021-29609: Incomplete validation in `SparseAdd`

TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `SparseAdd` results in allowing attackers to exploit undefined behavior (dereferencing null pointers) as well as write outside of bounds of heap allocated data. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/sparse_add_op.cc) has a large set of validation for the two sparse tensor inputs (6 tensors in total), but does not validate that the tensors are not empty or that the second dimension of `*_indices` matches the size of corresponding `*_shape`. This allows attackers to send tensor triples that represent invalid sparse tensors to abuse code assumptions that are not protected by validation. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

MediumCVSS 5.3Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Certain TensorFlow versions mishandle malformed sparse tensor inputs in SparseAdd. An attacker with some ability to supply tensor data could cause crashes and potentially corrupt heap memory. This is mainly a risk for shared ML platforms, notebooks, or services that process untrusted TensorFlow inputs.

Executive priority

Treat this as a moderate-priority dependency remediation for ML environments, especially shared platforms accepting user-controlled inputs. It is not reported as actively exploited, but the availability impact and memory corruption behavior justify scheduled patching and exposure review.

Technical view

SparseAdd validates many sparse tensor inputs but missed checks for empty tensors and whether indices dimensions match shape dimensions. Invalid sparse tensor triples can violate internal assumptions, causing null pointer dereference or out-of-bounds heap writes. The CVSS 3.1 score is 5.3 with local, high-complexity, low-privilege attack conditions.

Likely exposure

Exposure is most likely where affected TensorFlow versions process untrusted sparse tensors, user-submitted jobs, models, or data pipelines. Purely internal systems with trusted inputs have lower practical risk. The listed affected ranges include TensorFlow versions before the fixed 2.1.4, 2.2.3, 2.3.3, and 2.4.2 releases.

Exploitation context

The source bundle does not show active exploitation, and KEV is false. Exploitation requires local access or an equivalent ability to influence TensorFlow execution with crafted sparse tensor inputs. Availability impact is the clearest concern; integrity impact is listed as low.

Researcher notes

The core issue is incomplete validation in SparseAdd. Missing checks allow invalid sparse tensor triples where inputs are empty or indices shape metadata disagrees with dense shape metadata. The advisory ties this to undefined behavior, null pointer dereference, and heap out-of-bounds write.

Mitigation direction

  • Upgrade TensorFlow to 2.5.0 or the fixed supported branch release.
  • Use 2.4.2, 2.3.3, 2.2.3, or 2.1.4 where pinned to older branches.
  • Restrict untrusted users from submitting arbitrary TensorFlow jobs or tensor inputs.
  • Isolate shared ML workloads with least privilege and resource boundaries.
  • Review vendor advisory and commits for exact fixed build applicability.

Validation and detection

  • Inventory TensorFlow versions in applications, notebooks, containers, and training images.
  • Identify workflows that call SparseAdd or process sparse tensor inputs.
  • Confirm no deployed package falls within the affected version ranges.
  • Verify remediation by checking the deployed TensorFlow version after rebuild.
  • Review crash reports for TensorFlow sparse operation failures if exposure existed.
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-665: 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-29609 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.3 (3.1)
Known Exploited
No
Published

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

Vulnerability scoring details

Base CVSS 3.1 score

5.3Medium
CVSS 3.1 vector shape for CVE-2021-29609Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/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.1.4, >= 2.2.0, < 2.2.3, >= 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-665 · source CWE mapping

Improper Initialization

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