LiveActive security incident?Get immediate response
CVE Record

CVE-2021-29571: Memory corruption in `DrawBoundingBoxesV2`

TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.raw_ops.MaxPoolGradWithArgmax` can cause reads outside of bounds of heap allocated data if attacker supplies specially crafted inputs. The implementation(https://github.com/tensorflow/tensorflow/blob/31bd5026304677faa8a0b77602c6154171b9aec1/tensorflow/core/kernels/image/draw_bounding_box_op.cc#L116-L130) assumes that the last element of `boxes` input is 4, as required by [the op](https://www.tensorflow.org/api_docs/python/tf/raw_ops/DrawBoundingBoxesV2). Since this is not checked attackers passing values less than 4 can write outside of bounds of heap allocated objects and cause memory corruption. If the last dimension in `boxes` is less than 4, accesses similar to `tboxes(b, bb, 3)` will access data outside of bounds. Further during code execution there are also writes to these indices. 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 4.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-29571 is a TensorFlow memory corruption issue. Crafted input to a TensorFlow image operation can make the library access memory outside the expected bounds. Business impact is most relevant where untrusted users can submit tensors to ML training, inference, or data-processing services.

Executive priority

Treat as a scheduled remediation unless TensorFlow is exposed to untrusted users in shared ML or inference environments. In those cases, prioritize patching because memory corruption can affect service reliability and data integrity.

Technical view

The advisory describes missing validation of the last dimension of the `boxes` input for `DrawBoundingBoxesV2`. If it is less than 4, code can read and write out of bounds on heap-allocated data, causing memory corruption. CVSS is 4.5 with local access, high complexity, and low confidentiality, integrity, and availability impact.

Likely exposure

Exposure is likely limited to systems running affected TensorFlow versions and accepting attacker-controlled tensor inputs. Highest concern is shared ML platforms, notebooks, batch pipelines, or services where low-privileged users can influence TensorFlow operation inputs.

Exploitation context

The bundle does not show CISA KEV listing or cited evidence of active exploitation. Exploitation requires specially crafted inputs and is rated local, high-complexity, low-privilege, with no user interaction.

Researcher notes

The provided description contains a naming inconsistency mentioning `MaxPoolGradWithArgmax`, while the title, code reference, and operational detail point to `DrawBoundingBoxesV2`. Analysis follows the DrawBoundingBoxesV2 evidence in the bundle.

Mitigation direction

  • Upgrade TensorFlow to 2.5.0 or a listed backported fixed release.
  • Use 2.4.2, 2.3.3, 2.2.3, or 2.1.4 where those branches apply.
  • Restrict untrusted users from submitting arbitrary TensorFlow operation inputs.
  • Check TensorFlow vendor guidance if upgrade constraints block immediate patching.

Validation and detection

  • Inventory TensorFlow versions in applications, containers, notebooks, and lockfiles.
  • Flag versions matching the affected ranges in the source bundle.
  • Identify services accepting untrusted tensor, image, or model-processing inputs.
  • Confirm deployed runtimes use patched TensorFlow builds before closing remediation.
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
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-29571 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
4.5 (3.1)
Known Exploited
No
Published

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

Vulnerability scoring details

Base CVSS 3.1 score

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

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