SecurityContext

CVE-2021-37645: TensorFlow - Integer Overflow

  • Cve: CVE-2021-37645
  • Name: TensorFlow - Integer Overflow
  • Description: 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.
  • Impact: Potential memory corruption or denial of service due to integer overflow during memory allocation.
  • Remediation: Update to TensorFlow 2.6.0 or apply the patch from commit 96f364a1ca3009f98980021c4b32be5fdcca33a1 in affected versions 2.5.1 and 2.4.3.
  • Vulnerability type: integer_overflow
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.5
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Epss score: 0.00152
  • Epss percentile: 0.04331
  • Assignee: [email protected]
  • Published at: 2021-08-12T21:15:07Z
  • Age in days: 1930
  • Modified at: 2026-06-17T04:00:53Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-37645
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-681Incorrect Conversion between Numeric Types

References

UrlSourceTags
https://github.com/tensorflow/tensorflow/commit/96f364a1ca3009f98980021c4b32be5fdcca33a1nvdPatch, Third Party Advisory
https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9w2p-5mgw-p94cnvdThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
google:tensorflow= 2.6.0 rc0; = 2.6.0 rc1; = 2.6.0 rc2; = 2.5.0; >= 2.4.0, < 2.4.3; >= 2.3.0, < 2.3.4nonvd/v1/products/google/tensorflow

Projects

RepositoryLink kindsIndexedUrl
tensorflow/tensorflowcommit, fix, package, security_advisoryyes/v1/repositories/tensorflow/tensorflow

Index

  • Repositories: 340
  • Repositories high signal: 133
  • Packages: 3

Exploitation

  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts