LiveActive security incident?Get immediate response
CVE Record

CVE-2021-29614: Interpreter crash from `tf.io.decode_raw`

TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.io.decode_raw` produces incorrect results and crashes the Python interpreter when combining `fixed_length` and wider datatypes. The implementation of the padded version(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc) is buggy due to a confusion about pointer arithmetic rules. First, the code computes(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L61) the width of each output element by dividing the `fixed_length` value to the size of the type argument. The `fixed_length` argument is also used to determine the size needed for the output tensor(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L63-L79). This is followed by reencoding code(https://github.com/tensorflow/tensorflow/blob/1d8903e5b167ed0432077a3db6e462daf781d1fe/tensorflow/core/kernels/decode_padded_raw_op.cc#L85-L94). The erroneous code is the last line above: it is moving the `out_data` pointer by `fixed_length * sizeof(T)` bytes whereas it only copied at most `fixed_length` bytes from the input. This results in parts of the input not being decoded into the output. Furthermore, because the pointer advance is far wider than desired, this quickly leads to writing to outside the bounds of the backing data. This OOB write leads to interpreter crash in the reproducer mentioned here, but more severe attacks can be mounted too, given that this gadget allows writing to periodically placed locations in memory. 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

This TensorFlow flaw can crash a Python process and corrupt output when specific raw decoding options are combined. It matters most where less-trusted users can run TensorFlow code or feed data into TensorFlow decoding paths. The public sources do not show active exploitation.

Executive priority

Treat as a high-priority patch for shared ML systems and any production service that runs affected TensorFlow decoding logic. Standalone developer environments are lower urgency but should still be updated because the flaw can crash processes and may allow memory corruption effects.

Technical view

In tf.io.decode_raw, the padded raw decoder mishandles pointer arithmetic when fixed_length is used with wider output datatypes. It advances the output pointer by fixed_length * sizeof(T) after copying at most fixed_length bytes, causing incorrect decoding and out-of-bounds writes.

Likely exposure

Exposure is most likely in Python TensorFlow environments using affected versions and code paths that call tf.io.decode_raw with fixed_length and wider datatypes. Risk increases in shared notebooks, ML platforms, or services where low-privileged users can influence TensorFlow inputs or execution.

Exploitation context

The CVSS vector is local, low complexity, low privileges, no user interaction, with high integrity and availability impact. The advisory says interpreter crashes are demonstrated and more severe attacks may be possible. KEV is false, and the provided sources do not confirm exploitation in the wild.

Researcher notes

The issue maps to CWE-665 and centers on incorrect initialization or handling of resources. The affected ranges listed are TensorFlow versions below 2.1.4, 2.2.0 before 2.2.3, 2.3.0 before 2.3.3, and 2.4.0 before 2.4.2.

Mitigation direction

  • Upgrade to TensorFlow 2.5.0 or later where feasible.
  • Use patched branch releases 2.4.2, 2.3.3, 2.2.3, or 2.1.4.
  • Prioritize shared or multi-tenant TensorFlow execution environments.
  • Restrict untrusted users from running arbitrary TensorFlow workloads until patched.
  • Check TensorFlow vendor guidance for unsupported older releases.

Validation and detection

  • Inventory TensorFlow versions across applications, notebooks, containers, and training images.
  • Identify code using tf.io.decode_raw with fixed_length.
  • Review whether untrusted input can reach affected decode_raw calls.
  • Confirm deployed environments run patched TensorFlow versions.
  • Regression test ML pipelines that decode raw byte tensors.
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-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-29614 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-29614Attack 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-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.