LiveActive security incident?Get immediate response
CVE Record

CVE-2021-29605: Integer overflow in TFLite memory allocation

TensorFlow is an end-to-end open source platform for machine learning. The TFLite code for allocating `TFLiteIntArray`s is vulnerable to an integer overflow issue(https://github.com/tensorflow/tensorflow/blob/4ceffae632721e52bf3501b736e4fe9d1221cdfa/tensorflow/lite/c/common.c#L24-L27). An attacker can craft a model such that the `size` multiplier is so large that the return value overflows the `int` datatype and becomes negative. In turn, this results in invalid value being given to `malloc`(https://github.com/tensorflow/tensorflow/blob/4ceffae632721e52bf3501b736e4fe9d1221cdfa/tensorflow/lite/c/common.c#L47-L52). In this case, `ret->size` would dereference an invalid pointer. 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.

HighCVSS 7.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2021-29605 is a TensorFlow Lite memory allocation flaw. A specially crafted model can make an internal size calculation overflow, causing invalid memory allocation and a crash or integrity impact. Business risk is highest where affected TensorFlow/TFLite versions process models from users, partners, or other untrusted sources.

Executive priority

Treat as high priority for ML-enabled products that accept external models or run TensorFlow Lite in production. It is less urgent for isolated research environments with controlled models, but still merits planned upgrade because fixed releases are available and the impact includes availability and integrity.

Technical view

The TFLite allocator for TFLiteIntArray can overflow an int when calculating allocation size. The overflow may become a negative value passed into malloc, followed by dereferencing an invalid pointer through ret->size. The CVSS 3.1 score is 7.1, with local attack vector, low complexity, low privileges, no user interaction, and high integrity and availability impact.

Likely exposure

Exposure is likely in systems using TensorFlow versions before 2.1.4, 2.2.0 before 2.2.3, 2.3.0 before 2.3.3, or 2.4.0 before 2.4.2, especially if they load TensorFlow Lite models from untrusted or semi-trusted sources.

Exploitation context

The source bundle does not indicate known active exploitation, and KEV is false. The advisory describes attacker-controlled crafted models as the triggering condition. Exploitation appears local by CVSS, requiring access sufficient to supply or influence a model consumed by an affected TensorFlow Lite runtime.

Researcher notes

Focus validation on version reachability and model ingestion trust boundaries. The provided evidence supports an integer overflow in TFLiteIntArray allocation and a fixed upstream commit. It does not support claims of remote network exploitation, public weaponization, or confirmed active exploitation.

Mitigation direction

  • Upgrade TensorFlow to 2.5.0 or a fixed supported branch release.
  • Use 2.4.2, 2.3.3, 2.2.3, or 2.1.4 where branch constraints apply.
  • Inventory applications and embedded runtimes that include TensorFlow Lite.
  • Avoid loading untrusted TensorFlow Lite models until fixed versions are deployed.
  • Check TensorFlow vendor guidance for any environment-specific remediation notes.

Validation and detection

  • Confirm deployed TensorFlow versions against package manifests, lockfiles, containers, and SBOMs.
  • Identify services or apps that parse or execute TensorFlow Lite models.
  • Verify production builds include the fixed TensorFlow release or backported commit.
  • Review model ingestion paths for user, partner, or external supply sources.
  • Track crash or integrity anomalies around TensorFlow Lite model loading.
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-190: 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-29605 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:N/I:H/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
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:N/I:H/A:H1.85.2Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.1High
CVSS 3.1 vector shape for CVE-2021-29605Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Integer Overflow or Wraparound

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