Every CVE Search/ Get API key

CVE-2021-37645

Integer overflow due to conversion to unsigned in TensorFlow

5.5 MediumFix available

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 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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.15%Down 0.5 points since Aug 13, 2021
90%50%10%1%

What each source reports

CVE List Score used 5.5

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 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.

Record
CVE-2021-37645
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-681
Updated
2026-11-02
EUVDEUVD-2021-0371 5.5

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 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.

Record
EUVD-2021-0371
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-9w2p-5mgw-p94c 5.7

Integer overflow due to conversion to unsigned

Impact

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.

import tensorflow as tf

tf.raw_ops.QuantizeAndDequantizeV4Grad(
  gradients=[1.0,2.0],
  input=[1.0,1.0],
  input_min=[0.0],
  input_max=[10.0],
  axis=-100)

The implementation 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.

Patches

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.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by members of the Aivul Team from Qihoo 360.

Record
GHSA-9w2p-5mgw-p94c
CVSS 4.0
5.7 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-681
Updated
2026-11-02
NVD 5.5

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 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.

Record
CVE-2021-37645
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
2.1 LowAV:L/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-681
Updated
2026-11-02
OSV 5.5

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 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.

Record
CVE-2021-37645
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-9w2p-5mgw-p94c 5.7

Integer overflow due to conversion to unsigned

Impact

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.

import tensorflow as tf

tf.raw_ops.QuantizeAndDequantizeV4Grad(
  gradients=[1.0,2.0],
  input=[1.0,1.0],
  input_min=[0.0],
  input_max=[10.0],
  axis=-100)

The implementation 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.

Patches

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.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by members of the Aivul Team from Qihoo 360.

Record
GHSA-9w2p-5mgw-p94c
CVSS 4.0
5.7 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-681
Updated
2026-11-02
Show 6 moreShow less
OSVBIT-tensorflow-2021-37645 No score

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 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.

Record
BIT-tensorflow-2021-37645
Updated
2026-11-02
OSVopenSUSE-SU-2022:10014-1 No score

Security update for tensorflow2

This update for tensorflow fixes the following issues:

Update to TF2 2.6.0 which fixes multiple CVEs (boo#1189423).

  • Introduction of bazel6.3 and basel-skylib1.0.3 as build dependencies. The latter has been adapted to all a version in its package name (if %set_ver_suffix is set to 1). This allows multiple versions to exist for one product (not installed). NOTE: basel-skylib1.0.3 does not exist in oS:Factory: basel-skylib in oS:Factory - the base version - is 1.0.3.
Record
openSUSE-SU-2022:10014-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:12116-1 No score

tensorflow-lite-2.9.1-1.1 on GA media

These are all security issues fixed in the tensorflow-lite-2.9.1-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12116-1
Updated
2026-11-02
OSVPYSEC-2021-267 No score

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 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.

Record
PYSEC-2021-267
Updated
2026-11-02
OSVPYSEC-2021-558 No score

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 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.

Record
PYSEC-2021-558
Updated
2026-11-02
OSVPYSEC-2021-756 No score

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 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.

Record
PYSEC-2021-756
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
tensorflow
PyPI
before 2.4.3
2.4.3
tensorflow
PyPI
2.5.0 to 2.5.0
2.5.1
tensorflow-cpu
PyPI
before 2.4.3
2.4.3
tensorflow-cpu
PyPI
2.5.0 to 2.5.0
2.5.1
tensorflow-gpu
PyPI
before 2.4.3
2.4.3
tensorflow-gpu
PyPI
2.5.0 to 2.5.0
2.5.1
tensorflow
Bitnami
2.3.0 up to 2.3.4, 2.4.0 up to 2.4.3, 2.5.0 up to 2.5.1
2.3.42.4.32.5.1
tensorflow
PyPI
before 2.4.3, plus listed versions
0.12.00.12.11.0.01.0.11.1.0
Show 45 moreShow less
1.10.01.10.11.11.01.12.01.12.21.12.31.13.11.13.21.14.01.15.01.15.21.15.31.15.41.15.51.2.01.2.11.3.01.4.01.4.11.5.01.5.11.6.01.7.01.7.11.8.01.9.02.0.02.0.12.0.22.0.32.0.42.1.02.1.12.1.22.1.32.1.42.2.02.2.12.2.22.2.32.3.02.3.12.3.22.3.32.3.4
2.4.3
tensorflow
PyPI
2.5.0 up to 2.5.1
2.5.1
tensorflow-cpu
PyPI
before 2.4.3, plus listed versions
1.15.02.1.02.1.12.1.22.1.3
Show 13 moreShow less
2.1.42.2.02.2.12.2.22.2.32.3.02.3.12.3.22.3.32.3.42.4.02.4.12.4.2
2.4.3
Show 18 moreShow less
Affected packages
PackageAffectedFixed
tensorflow-cpu
PyPI
2.5.0 up to 2.5.1
2.5.1
tensorflow-gpu
PyPI
before 2.4.3, plus listed versions
0.12.00.12.11.0.01.0.11.1.0
Show 45 moreShow less
1.10.01.10.11.11.01.12.01.12.21.12.31.13.11.13.21.14.01.15.01.15.21.15.31.15.41.15.51.2.01.2.11.3.01.4.01.4.11.5.01.5.11.6.01.7.01.7.11.8.01.9.02.0.02.0.12.0.22.0.32.0.42.1.02.1.12.1.22.1.32.1.42.2.02.2.12.2.22.2.32.3.02.3.12.3.22.3.32.3.4
2.4.3
tensorflow-gpu
PyPI
2.5.0 up to 2.5.1
2.5.1
tensorflow
PyPI
2.3.0 up to 2.3.4, 2.4.0 up to 2.4.3, plus listed versions
2.3.12.3.22.3.32.4.12.4.2
2.3.42.4.3
tensorflow-cpu
PyPI
2.3.0 up to 2.3.4, 2.4.0 up to 2.4.3, plus listed versions
2.3.12.3.22.3.32.4.12.4.2
2.3.42.4.3
tensorflow-gpu
PyPI
2.3.0 up to 2.3.4, 2.4.0 up to 2.4.3, plus listed versions
2.3.12.3.22.3.32.4.12.4.2
2.3.42.4.3
bazel-skylib1.0.3
SUSE:Package Hub 15 SP3
From an advisory covering 63 CVEs
before 1.0.3-bp153.2.1
1.0.3-bp153.2.1
bazel3.7
SUSE:Package Hub 15 SP3
From an advisory covering 63 CVEs
before 3.7.2-bp153.4.1
3.7.2-bp153.4.1
tensorflow2
SUSE:Package Hub 15 SP3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
tensorflow2-lite
SUSE:Package Hub 15 SP3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
tensorflow2_2_6_0-gnu-hpc
SUSE:Package Hub 15 SP3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
tensorflow2_2_6_0-gnu-openmpi2-hpc
SUSE:Package Hub 15 SP3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
bazel-skylib1.0.3
openSUSE:Leap 15.3
From an advisory covering 63 CVEs
before 1.0.3-bp153.2.1
1.0.3-bp153.2.1
bazel3.7
openSUSE:Leap 15.3
From an advisory covering 63 CVEs
before 3.7.2-bp153.4.1
3.7.2-bp153.4.1
tensorflow2
openSUSE:Leap 15.3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
tensorflow2-lite
openSUSE:Leap 15.3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
tensorflow2_2_6_0-gnu-hpc
openSUSE:Leap 15.3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1
tensorflow2_2_6_0-gnu-openmpi2-hpc
openSUSE:Leap 15.3
From an advisory covering 63 CVEs
before 2.6.0-bp153.2.3.1
2.6.0-bp153.2.3.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-37645 is a medium vulnerability (CVSS 5.5) in Google Tensorflow, published August 12, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.15%, the 4th percentile. Fixed in tensorflow 2.4.3.

References

Show 177 moreShow less
This page doesn't list everything

Left out here: 6 versions. The JSON record has them.

MoveEnter Open