Every CVE Search/ Get API key

CVE-2022-21740

Heap overflow in Tensorflow

7.6 HighFix available

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
High

Exploit likelihood

0.79%Down 0.2 points since Feb 8, 2022
90%50%10%1%

What each source reports

CVE List Score used 7.6

Heap overflow in Tensorflow

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
CVE-2022-21740
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Weakness
CWE-787
Updated
2026-11-02
EUVDEUVD-2022-0303 7.6

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
EUVD-2022-0303
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-44qp-9wwf-734r 7.2

Heap overflow in Tensorflow

Impact

The implementation of SparseCountSparseOutput is vulnerable to a heap overflow:

import tensorflow as tf
import numpy as np

tf.raw_ops.SparseCountSparseOutput(
  indices=[[-1,-1]],
  values=[2],
  dense_shape=[1, 1],
  weights=[1],
  binary_output=True,
  minlength=-1,
  maxlength=-1,
  name=None)

Patches

We have patched the issue in GitHub commits 2b7100d6cdff36aa21010a82269bc05a6d1cc74a and adbbabdb0d3abb3cdeac69e38a96de1d678b24b3.

The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.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 Faysal Hossain Shezan from University of Virginia.

Record
GHSA-44qp-9wwf-734r
CVSS 4.0
7.2 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Weakness
CWE-120, CWE-787
Updated
2026-11-02
NVD 7.6

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
CVE-2022-21740
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.5 MediumAV:N/AC:L/Au:S/C:P/I:P/A:P
Weakness
CWE-787
Updated
2026-11-02
OSV 7.6

Heap overflow in Tensorflow

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
CVE-2022-21740
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Updated
2026-11-02
OSVGHSA-44qp-9wwf-734r 7.2

Heap overflow in Tensorflow

Impact

The implementation of SparseCountSparseOutput is vulnerable to a heap overflow:

import tensorflow as tf
import numpy as np

tf.raw_ops.SparseCountSparseOutput(
  indices=[[-1,-1]],
  values=[2],
  dense_shape=[1, 1],
  weights=[1],
  binary_output=True,
  minlength=-1,
  maxlength=-1,
  name=None)

Patches

We have patched the issue in GitHub commits 2b7100d6cdff36aa21010a82269bc05a6d1cc74a and adbbabdb0d3abb3cdeac69e38a96de1d678b24b3.

The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.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 Faysal Hossain Shezan from University of Virginia.

Record
GHSA-44qp-9wwf-734r
CVSS 4.0
7.2 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Weakness
CWE-120, CWE-787
Updated
2026-11-02
Show 5 moreShow less
OSVPYSEC-2026-3097 7.2

Heap overflow in Tensorflow

Impact

The implementation of SparseCountSparseOutput is vulnerable to a heap overflow:

import tensorflow as tf
import numpy as np

tf.raw_ops.SparseCountSparseOutput(
  indices=[[-1,-1]],
  values=[2],
  dense_shape=[1, 1],
  weights=[1],
  binary_output=True,
  minlength=-1,
  maxlength=-1,
  name=None)

Patches

We have patched the issue in GitHub commits 2b7100d6cdff36aa21010a82269bc05a6d1cc74a and adbbabdb0d3abb3cdeac69e38a96de1d678b24b3.

The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.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 Faysal Hossain Shezan from University of Virginia.

Record
PYSEC-2026-3097
CVSS 4.0
7.2 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.6 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Updated
2026-11-02
OSVBIT-tensorflow-2022-21740 No score

Heap overflow in Tensorflow

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
BIT-tensorflow-2022-21740
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-2022-119 No score

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
PYSEC-2022-119
Updated
2026-11-02
OSVPYSEC-2022-64 No score

Tensorflow is an Open Source Machine Learning Framework. The implementation of SparseCountSparseOutput is vulnerable to a heap overflow. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Record
PYSEC-2022-64
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
tensorflow
PyPI
before 2.5.3
2.5.3
tensorflow
PyPI
2.6.0 up to 2.6.3
2.6.3
tensorflow
PyPI
2.7.0 to 2.7.0
2.7.1
tensorflow-cpu
PyPI
before 2.5.3
2.5.3
tensorflow-cpu
PyPI
2.6.0 up to 2.6.3
2.6.3
tensorflow-cpu
PyPI
2.7.0 to 2.7.0
2.7.1
tensorflow-gpu
PyPI
before 2.5.3
2.5.3
tensorflow-gpu
PyPI
2.6.0 up to 2.6.3
2.6.3
tensorflow-gpu
PyPI
2.7.0 to 2.7.0
2.7.1
tensorflow
Bitnami
before 2.5.3, 2.6.0 up to 2.6.3, 2.7.0 up to 2.7.1
2.5.32.6.32.7.1
Show 12 moreShow less
Affected packages
PackageAffectedFixed
tensorflow
PyPI
before 2.5.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.5.3
tensorflow
PyPI
2.6.0 up to 2.6.3, plus listed versions
2.6.12.6.2
2.6.3
tensorflow
PyPI
2.7.0 up to 2.7.1
2.7.1
tensorflow-cpu
PyPI
before 2.5.3, plus listed versions
1.15.02.1.02.1.12.1.22.1.3
Show 18 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.22.4.32.4.42.5.02.5.12.5.2
2.5.3
tensorflow-cpu
PyPI
2.6.0 up to 2.6.3, plus listed versions
2.6.12.6.2
2.6.3
tensorflow-cpu
PyPI
2.7.0 up to 2.7.1
2.7.1
tensorflow-gpu
PyPI
before 2.5.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.5.3
tensorflow-gpu
PyPI
2.6.0 up to 2.6.3, plus listed versions
2.6.12.6.2
2.6.3
tensorflow-gpu
PyPI
2.7.0 up to 2.7.1
2.7.1
tensorflow-gpu
PyPI
before 2.5.3, 2.6.0 up to 2.6.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.5.32.6.3
tensorflow-cpu
PyPI
before 2.5.3, 2.6.0 up to 2.6.3, plus listed versions
1.15.02.1.02.1.12.1.22.1.3
Show 20 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.22.4.32.4.42.5.02.5.12.5.22.6.12.6.2
2.5.32.6.3
tensorflow
PyPI
before 2.5.3, 2.6.0 up to 2.6.3, 2.7.0 up to 2.7.1, 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.5.32.6.32.7.1

History

History
RecordedChangedSources
facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

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

In short

CVE-2022-21740 is a high vulnerability (CVSS 7.6) in Google Tensorflow, published February 3, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.79%, the 56th percentile. Fixed in tensorflow 2.5.3.

References

Show 168 moreShow less
This page doesn't list everything

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

MoveEnter Open