Every CVE Search/ Get API key

CVE-2021-37655

Heap OOB in `ResourceScatterUpdate` in TensorFlow

7.3 HighFix available

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

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
High
Integrity
Low
Availability
High

Exploit likelihood

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

What each source reports

CVE List Score used 7.3

Heap OOB in `ResourceScatterUpdate` in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
CVE-2021-37655
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
Weakness
CWE-125
Updated
2026-11-02
EUVDEUVD-2021-0381 7.3

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
EUVD-2021-0381
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-7fvx-3jfc-2cpc 7.0

Heap OOB in `ResourceScatterUpdate`

Impact

An attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate:

import tensorflow as tf

v = tf.Variable([b'vvv'])
tf.raw_ops.ResourceScatterUpdate(
  resource=v.handle,
  indices=[0],
  updates=['1', '2', '3', '4', '5'])

The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship.

Patches

We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f.

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.

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-7fvx-3jfc-2cpc
CVSS 4.0
7.0 HighCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
Weakness
CWE-125
Updated
2026-11-02
NVD 7.3

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
CVE-2021-37655
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
CVSS 2.0
4.6 MediumAV:L/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-125
Updated
2026-11-02
OSV 7.3

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
CVE-2021-37655
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
Updated
2026-11-02
OSVGHSA-7fvx-3jfc-2cpc 7.0

Heap OOB in `ResourceScatterUpdate`

Impact

An attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate:

import tensorflow as tf

v = tf.Variable([b'vvv'])
tf.raw_ops.ResourceScatterUpdate(
  resource=v.handle,
  indices=[0],
  updates=['1', '2', '3', '4', '5'])

The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship.

Patches

We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f.

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.

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-7fvx-3jfc-2cpc
CVSS 4.0
7.0 HighCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
Weakness
CWE-125
Updated
2026-11-02
Show 6 moreShow less
OSVBIT-tensorflow-2021-37655 No score

Heap OOB in `ResourceScatterUpdate` in TensorFlow

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
BIT-tensorflow-2021-37655
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-277 No score

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
PYSEC-2021-277
Updated
2026-11-02
OSVPYSEC-2021-568 No score

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

Record
PYSEC-2021-568
Updated
2026-11-02
OSVPYSEC-2021-766 No score

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.raw_ops.ResourceScatterUpdate. The implementation has an incomplete validation of the relationship between the shapes of indices and updates: instead of checking that the shape of indices is a prefix of the shape of updates (so that broadcasting can happen), code only checks that the number of elements in these two tensors are in a divisibility relationship. We have patched the issue in GitHub commit 01cff3f986259d661103412a20745928c727326f. 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.

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

Affected products

Affected packages

Affected packages
PackageAffectedFixed
tensorflow
PyPI
before 2.3.4
2.3.4
tensorflow
PyPI
2.4.0 up to 2.4.3
2.4.3
tensorflow
PyPI
2.5.0 to 2.5.0
2.5.1
tensorflow-cpu
PyPI
before 2.3.4
2.3.4
tensorflow-cpu
PyPI
2.4.0 up to 2.4.3
2.4.3
tensorflow-cpu
PyPI
2.5.0 to 2.5.0
2.5.1
tensorflow-gpu
PyPI
before 2.3.4
2.3.4
tensorflow-gpu
PyPI
2.4.0 up to 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
Show 24 moreShow less
Affected packages
PackageAffectedFixed
tensorflow
PyPI
before 2.3.4, plus listed versions
0.12.00.12.11.0.01.0.11.1.0
Show 44 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.3
2.3.4
tensorflow
PyPI
2.4.0 up to 2.4.3, plus listed versions
2.4.12.4.2
2.4.3
tensorflow
PyPI
2.5.0 up to 2.5.1
2.5.1
tensorflow-cpu
PyPI
before 2.3.4, plus listed versions
1.15.02.1.02.1.12.1.22.1.3
Show 9 moreShow less
2.1.42.2.02.2.12.2.22.2.32.3.02.3.12.3.22.3.3
2.3.4
tensorflow-cpu
PyPI
2.4.0 up to 2.4.3, plus listed versions
2.4.12.4.2
2.4.3
tensorflow-cpu
PyPI
2.5.0 up to 2.5.1
2.5.1
tensorflow-gpu
PyPI
before 2.3.4, plus listed versions
0.12.00.12.11.0.01.0.11.1.0
Show 44 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.3
2.3.4
tensorflow-gpu
PyPI
2.4.0 up to 2.4.3, plus listed versions
2.4.12.4.2
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-37655 is a high vulnerability (CVSS 7.3) 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.17%, the 6th percentile. Fixed in tensorflow 2.3.4.

References

Show 177 moreShow less
MoveEnter Open