cve.bz

CVE-2021-37639 google tensorflow: Out-of-bounds Read

7.8 highEPSS 0.2%Fix available

High (7.8) in google tensorflow. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in tensorflow 2.3.4, 2.4.3, 2.5.1.

On this page
TensorFlow is an end-to-end open source platform for machine learning. When restoring tensors via raw APIs, if the tensor name is not provided, TensorFlow can be tricked into dereferencing a null pointer. Alternatively, attackers can read memory outside the bounds of heap allocated data by providing some tensor names but not enough for a successful restoration. The [implementation](https://github.com/tensorflow/tensorflow/blob/47a06f40411a69c99f381495f490536972152ac0/tensorflow/core/kernels/save_restore_tensor.cc#L158-L159) retrieves the tensor list corresponding to the `tensor_name` user controlled input and immediately retrieves the tensor at the restoration index (controlled via `preferred_shard` argument). This occurs without validating that the provided list has enough values. If the list is empty this results in dereferencing a null pointer (undefined behavior). If, however, the list has some elements, if the restoration index is outside the bounds this results in heap OOB read. We have patched the issue in GitHub commit 9e82dce6e6bd1f36a57e08fa85af213e2b2f2622. 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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 7th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-125 Out-of-bounds Read
CWE-476 NULL Pointer Dereference
OWASP Top 10
A10:2025 Mishandling of Exceptional Conditions
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-37639 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-37639?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-37639?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-37639 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
google:tensorflowfrom 2.3.0 before 2.3.4
google:tensorflowfrom 2.4.0 before 2.4.3
google:tensorflow2.5.0
google:tensorflow2.6.0:rc0
google:tensorflow2.6.0:rc1
google:tensorflow2.6.0:rc2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-gh6x-4whr-2qv4PyPItensorflow<2.3.42.3.4
GHSA-gh6x-4whr-2qv4PyPItensorflow>=2.4.0 <2.4.32.4.3
GHSA-gh6x-4whr-2qv4PyPItensorflow>=2.5.0 <2.5.12.5.1
GHSA-gh6x-4whr-2qv4PyPItensorflow-cpu<2.3.42.3.4
GHSA-gh6x-4whr-2qv4PyPItensorflow-cpu>=2.4.0 <2.4.32.4.3
GHSA-gh6x-4whr-2qv4PyPItensorflow-cpu>=2.5.0 <2.5.12.5.1
GHSA-gh6x-4whr-2qv4PyPItensorflow-gpu<2.3.42.3.4
GHSA-gh6x-4whr-2qv4PyPItensorflow-gpu>=2.4.0 <2.4.32.4.3
GHSA-gh6x-4whr-2qv4PyPItensorflow-gpu>=2.5.0 <2.5.12.5.1
PYSEC-2021-261PyPItensorflow>=2.3.0 <2.3.4
>=2.4.0 <2.4.3
2.3.4, 2.4.3
PYSEC-2021-552PyPItensorflow-cpu>=2.3.0 <2.3.4
>=2.4.0 <2.4.3
2.3.4, 2.4.3
PYSEC-2021-750PyPItensorflow-gpu>=2.3.0 <2.3.4
>=2.4.0 <2.4.3
2.3.4, 2.4.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSEPackage Hub 15 SP3bazel-skylib1.0.31.0.3-bp153.2.1openSUSE-SU-2022:10014-1
SUSEPackage Hub 15 SP3bazel3.73.7.2-bp153.4.1openSUSE-SU-2022:10014-1
SUSEPackage Hub 15 SP3tensorflow2, tensorflow2-lite, tensorflow2_2_6_0-gnu-hpc and 1 more2.6.0-bp153.2.3.1openSUSE-SU-2022:10014-1
openSUSELeap 15.3bazel-skylib1.0.31.0.3-bp153.2.1openSUSE-SU-2022:10014-1
openSUSELeap 15.3bazel3.73.7.2-bp153.4.1openSUSE-SU-2022:10014-1
openSUSELeap 15.3tensorflow2, tensorflow2-lite, tensorflow2_2_6_0-gnu-hpc and 1 more2.6.0-bp153.2.3.1openSUSE-SU-2022:10014-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE · openSUSE.

Attack patterns (CAPEC)

  • CAPEC-540 Overread Buffers Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON