LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37650: Segfault and heap buffer overflow in `{Experimental,}DatasetToTFRecord` in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation for `tf.raw_ops.ExperimentalDatasetToTFRecord` and `tf.raw_ops.DatasetToTFRecord` can trigger heap buffer overflow and segmentation fault. The [implementation](https://github.com/tensorflow/tensorflow/blob/f24faa153ad31a4b51578f8181d3aaab77a1ddeb/tensorflow/core/kernels/data/experimental/to_tf_record_op.cc#L93-L102) assumes that all records in the dataset are of string type. However, there is no check for that, and the example given above uses numeric types. We have patched the issue in GitHub commit e0b6e58c328059829c3eb968136f17aa72b6c876. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This TensorFlow flaw can crash a process or corrupt memory when certain dataset-to-TFRecord operations receive records that are not strings. The issue matters most where users, jobs, or data pipelines can run TensorFlow code on shared or sensitive systems.

Executive priority

Treat this as a high-priority patch for ML environments that allow shared execution or untrusted pipeline input. Standalone, trusted developer workstations are lower urgency but should still move to supported patched TensorFlow releases.

Technical view

CVE-2021-37650 affects tf.raw_ops.ExperimentalDatasetToTFRecord and tf.raw_ops.DatasetToTFRecord. The implementation assumed all dataset records were strings without validating type, allowing heap buffer overflow and segmentation fault. CVSS 3.1 is 7.8, local attack vector, low complexity, low privileges, and high confidentiality, integrity, and availability impact.

Likely exposure

Exposure is most likely in TensorFlow 2.5.0 before 2.5.1, 2.4.x before 2.4.3, and versions before 2.3.4 where these raw ops are reachable through local code, ML jobs, notebooks, or data pipelines.

Exploitation context

The supplied sources do not show active exploitation, and KEV status is false. Exploitation requires local ability to execute or influence TensorFlow operations. Risk increases in multi-user ML platforms, hosted notebooks, CI training jobs, or services processing untrusted pipeline definitions.

Researcher notes

The root issue is missing type validation before serialization in TensorFlow's dataset-to-TFRecord kernel. The vendor states commit e0b6e58c328059829c3eb968136f17aa72b6c876 patches the issue. No supplied source establishes remote exploitability or in-the-wild exploitation.

Mitigation direction

  • Upgrade to TensorFlow 2.6.0 or patched 2.5.1, 2.4.3, or 2.3.4.
  • Review TensorFlow's advisory and patched commit before approving any exception.
  • Limit DatasetToTFRecord operations to trusted, validated string datasets until patched.
  • Restrict who can run or modify TensorFlow data pipelines on affected systems.

Validation and detection

  • Inventory deployed TensorFlow versions across notebooks, services, images, and training workers.
  • Check code and pipeline definitions for DatasetToTFRecord or ExperimentalDatasetToTFRecord usage.
  • Confirm affected environments have upgraded to a fixed TensorFlow release.
  • Validate that datasets passed to these operations contain string records only.
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-37650 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.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/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.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

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

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/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.5.0, < 2.5.1, >= 2.4.0, < 2.4.3, < 2.3.4Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.