LiveActive security incident?Get immediate response
CVE Record

CVE-2021-37645: Integer overflow due to conversion to unsigned in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation of `tf.raw_ops.QuantizeAndDequantizeV4Grad` is vulnerable to an integer overflow issue caused by converting a signed integer value to an unsigned one and then allocating memory based on this value. The [implementation](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L126) uses the `axis` value as the size argument to `absl::InlinedVector` constructor. But, the constructor uses an unsigned type for the argument, so the implicit conversion transforms the negative value to a large integer. We have patched the issue in GitHub commit 96f364a1ca3009f98980021c4b32be5fdcca33a1. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, and TensorFlow 2.4.3, as these are also affected and still in supported range.

MediumCVSS 5.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

A flaw in TensorFlow can let a low-privileged local user or workload trigger excessive memory allocation through a specific ML operation, causing a denial of service. The issue affects certain TensorFlow 2.4.x and 2.5.x versions and is fixed in vendor releases and a referenced patch.

Executive priority

Treat as a moderate availability risk for ML platforms. Prioritize shared or multi-user TensorFlow environments first, because successful abuse can disrupt workloads but the provided sources do not indicate data theft, integrity compromise, or active exploitation.

Technical view

QuantizeAndDequantizeV4Grad mishandles the axis value by converting a signed integer to an unsigned size for absl::InlinedVector. Negative input can become a very large allocation request, creating an integer conversion overflow and availability impact. CVSS 3.1 rates it 5.5 with local attack vector and high availability impact.

Likely exposure

Exposure is most likely where affected TensorFlow versions run local or shared ML workloads, notebooks, training jobs, or services that process untrusted model operations or user-controlled graph inputs.

Exploitation context

The bundle does not show active exploitation, and CISA KEV status is false. The CVSS vector requires local access and low privileges, with no user interaction, and impacts availability rather than confidentiality or integrity.

Researcher notes

Evidence is strongest for root cause, affected TensorFlow ranges, CVSS, and fixed releases. The provided sources do not include exploit reports, KEV listing, or broader product impact beyond TensorFlow itself.

Mitigation direction

  • Upgrade TensorFlow to 2.6.0, 2.5.1, 2.4.3, or later supported fixed versions.
  • Apply TensorFlow commit 96f364a1ca3009f98980021c4b32be5fdcca33a1 if maintaining a custom build.
  • Restrict untrusted users from running arbitrary TensorFlow workloads on shared systems.
  • Follow TensorFlow vendor guidance for supported branches and backports.

Validation and detection

  • Inventory TensorFlow package versions across ML services, notebooks, containers, and training environments.
  • Flag versions >=2.5.0 and <2.5.1, and versions <2.4.3, for remediation review.
  • Confirm patched builds include commit 96f364a1ca3009f98980021c4b32be5fdcca33a1 or an equivalent fixed release.
  • Review shared ML environments for untrusted local users or tenant-controlled workloads.
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-681: 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-37645 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.5 (3.1)
Known Exploited
No
Published

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

Vulnerability scoring details

Base CVSS 3.1 score

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

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

CWE details

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

CWE-681 · source CWE mapping

Incorrect Conversion between Numeric Types

Incorrect Conversion between Numeric Types represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.