CVE-2020-26269
JSON

7.5high

Heap out of bounds read in filesystem glob matching in TensorFlow

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
0.70% (higher than 54% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9jjw-hf72-3mxwBIT-TENSORFLOW-2020-26269PYSEC-2020-141PYSEC-2020-300PYSEC-2020-335

Description

In TensorFlow release candidate versions 2.4.0rc*, the general implementation for matching filesystem paths to globbing pattern is vulnerable to an access out of bounds of the array holding the directories. There are multiple invariants and preconditions that are assumed by the parallel implementation of GetMatchingPaths but are not verified by the PRs introducing it (#40861 and #44310). Thus, we are completely rewriting the implementation to fully specify and validate these. This is patched in version 2.4.0. This issue only impacts master branch and the release candidates for TF version 2.4. The final release of the 2.4 release will be patched.

Affected

Product or packageVersionsReported by
tensorflow tensorflow.4.0rc*CVE List
tensorflow (PyPI)from 2.4.0rc0 before 2.4.0, before 8b5b9dc96666a3a5d27fad7179ff215e3b74b67cGitHub Advisory Database, PyPA Advisory Database
tensorflow-cpu (PyPI)from 2.4.0rc0 before 2.4.0, before 8b5b9dc96666a3a5d27fad7179ff215e3b74b67cGitHub Advisory Database, PyPA Advisory Database
tensorflow-gpu (PyPI)from 2.4.0rc0 before 2.4.0, before 8b5b9dc96666a3a5d27fad7179ff215e3b74b67cGitHub Advisory Database, PyPA Advisory Database
google tensorflow2.4.0NVD
tensorflow (Bitnami)from 2.4.0-rc0 before 2.4.0, from 2.4.0-rc1 before 2.4.0, from 2.4.0-rc2 before 2.4.0, from 2.4.0-rc3 before 2.4.0, from 2.4.0-rc4 before 2.4.0Bitnami Vulnerability Database

All scores

GitHub9.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

In TensorFlow release candidate versions 2.4.0rc*, the general implementation for matching filesystem paths to globbing pattern is vulnerable to an access out of bounds of the array holding the directories. There are multiple invariants and preconditions that are assumed by the parallel implementation of GetMatchingPaths but are not verified by the PRs introducing it (#40861 and #44310). Thus, we are completely rewriting the implementation to fully specify and validate these. This is patched in version 2.4.0. This issue only impacts master branch and the release candidates for TF version 2.4. The final release of the 2.4 release will be patched.

GitHub Advisory Database
Impact

The general implementation for matching filesystem paths to globbing pattern is vulnerable to an access out of bounds of the array holding the directories:

if (!fs->Match(child_path, dirs[dir_index])) { ... }

Since dir_index is unconditionaly incremented outside of the lambda function where the vulnerable pattern occurs, this results in an access out of bounds issue under certain scenarios. For example, if /tmp/x is a directory that only contains a single file y, then the following scenario will cause a crash due to the out of bounds read:

>>> tf.io.gfile.glob('/tmp/x/')
Segmentation fault

There are multiple invariants and preconditions that are assumed by the parallel implementation of GetMatchingPaths but are not verified by the PRs introducing it (#40861 and #44310). Thus, we are completely rewriting the implementation to fully specify and validate these.

Patches

We have patched the issue in GitHub commit 8b5b9dc96666a3a5d27fad7179ff215e3b74b67c and will release TensorFlow 2.4.0 containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.

This issue only impacts master branch and the release candidates for TF version 2.4. The final release of the 2.4 release will be patched.

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.

NVD (es)

En las versiones candidatas a lanzamiento de TensorFlow 2.4.0rc*, la implementación general para hacer coincidir las rutas del sistema de archivos con el patrón globbing es vulnerable a un acceso fuera de límites de la matriz que contiene los directorios. Existen múltiples invariantes y condiciones previas que son asumidas por la implementación paralela de GetMatchingPaths pero no son verificadas por los RP que lo presentan (#40861 y #44310). Por lo tanto, estamos reescribiendo completamente la implementación para especificarlos y validarlos completamente. Esto está parcheado en la versión 2.4.0. Este problema solo afecta a la rama maestra y a los candidatas de lanzamiento para TF versión 2.4. La versión final de la versión 2.4 será parcheada.

References

https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9jjw-hf72-3mxwadvisory, exploit, patch, third-party-advisory, web
https://github.com/tensorflow/tensorflow/commit/8b5b9dc96666a3a5d27fad7179ff215e3b74b67cfix, patch, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2020-26269advisory, web
https://github.com/tensorflow/tensorflow/pull/40861web
https://github.com/tensorflow/tensorflow/pull/44310web
https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-300.yamlweb
https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-335.yamlweb
https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-141.yamlweb
https://github.com/tensorflow/tensorflowpackage
https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L106web
https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L127web

Sources

SourceRecordLicence
CVE ListCVE-2020-26269 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-9jjw-hf72-3mxw changed 2026-09-10CC-BY-4.0
NVDCVE-2020-26269 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2020-141 changed 2023-12-06CC-BY-4.0
PyPA Advisory DatabasePYSEC-2020-300 changed 2023-12-06CC-BY-4.0
PyPA Advisory DatabasePYSEC-2020-335 changed 2023-12-06CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2020-26269 changed 2025-05-20Apache-2.0