{"id":"CVE-2020-26269","aliases":["CVE-2020-26269","GHSA-9jjw-hf72-3mxw","BIT-TENSORFLOW-2020-26269","PYSEC-2020-141","PYSEC-2020-300","PYSEC-2020-335"],"related":[],"kind":"vulnerability","state":"published","title":"Heap out of bounds read in filesystem glob matching in TensorFlow","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe general implementation for matching filesystem paths to globbing pattern is vulnerable to an access out of bounds of [the array holding the directories](https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L127):\n\n```cc\nif (!fs->Match(child_path, dirs[dir_index])) { ... }\n```\n\nSince `dir_index` is [unconditionaly incremented](https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L106) 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:\n\n```python\n>>> tf.io.gfile.glob('/tmp/x/')\nSegmentation fault\n```\n\nThere are multiple invariants and preconditions that are assumed by the parallel implementation of `GetMatchingPaths` but are not verified by the PRs introducing it ([#40861](https://github.com/tensorflow/tensorflow/pull/40861) and [#44310](https://github.com/tensorflow/tensorflow/pull/44310)). Thus, we are completely rewriting the implementation to fully specify and validate these.\n\n### Patches\nWe have patched the issue in GitHub commit [8b5b9dc96666a3a5d27fad7179ff215e3b74b67c](https://github.com/tensorflow/tensorflow/commit/8b5b9dc96666a3a5d27fad7179ff215e3b74b67c) and will release TensorFlow 2.4.0 containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.\n\nThis 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.\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n### Attribution\nThis vulnerability has been reported by members of the Aivul Team from Qihoo 360.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.&#xa0;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).&#xa0;Por lo tanto, estamos reescribiendo completamente la implementación para especificarlos y validarlos completamente.&#xa0;Esto está parcheado en la versión 2.4.0.&#xa0;Este problema solo afecta a la rama maestra y a los candidatas de lanzamiento para TF versión 2.4.&#xa0;La versión final de la versión 2.4 será parcheada.","source":"nvd"}],"published":"2020-12-10T22:10:28.000Z","modified":"2026-09-10T03:49:46.420Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"version":".4.0rc*","status":"affected"}],"vendor":"tensorflow","product":"tensorflow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.4.0rc0","status":"affected","fixed":"2.4.0"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.4.0rc0","status":"affected","fixed":"2.4.0"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.4.0rc0","status":"affected","fixed":"2.4.0"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","source":"ghsa"},{"ranges":[{"status":"affected","version":"2.4.0"},{"status":"affected","version":"2.4.0"},{"status":"affected","version":"2.4.0"},{"status":"affected","version":"2.4.0"},{"status":"affected","version":"2.4.0"}],"vendor":"google","product":"tensorflow","cpe":"cpe:2.3:a:google:tensorflow:2.4.0:rc0:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"},{"type":"ecosystem","introduced":"2.4.0rc0","status":"affected","fixed":"2.4.0"}],"ecosystem":"PyPI","package":"tensorflow","purl":"pkg:pypi/tensorflow","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"},{"type":"ecosystem","introduced":"2.4.0rc0","status":"affected","fixed":"2.4.0"}],"ecosystem":"PyPI","package":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"},{"type":"ecosystem","introduced":"2.4.0rc0","status":"affected","fixed":"2.4.0"}],"ecosystem":"PyPI","package":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","repo":"https://github.com/tensorflow/tensorflow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.4.0-rc0","status":"affected","fixed":"2.4.0"},{"type":"semver","introduced":"2.4.0-rc1","status":"affected","fixed":"2.4.0"},{"type":"semver","introduced":"2.4.0-rc2","status":"affected","fixed":"2.4.0"},{"type":"semver","introduced":"2.4.0-rc3","status":"affected","fixed":"2.4.0"},{"type":"semver","introduced":"2.4.0-rc4","status":"affected","fixed":"2.4.0"}],"ecosystem":"Bitnami","package":"tensorflow","purl":"pkg:bitnami/tensorflow","source":"bitnami"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9jjw-hf72-3mxw","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/commit/8b5b9dc96666a3a5d27fad7179ff215e3b74b67c","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26269","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/tensorflow/tensorflow/pull/40861","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow/pull/44310","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-300.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-335.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-141.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L106","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L127","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-26269","url":"https://www.cve.org/CVERecord?id=CVE-2020-26269","licence":"CVE Terms of Use","modified":"2024-08-04T15:56:04.075Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9jjw-hf72-3mxw","url":"https://github.com/advisories/GHSA-9jjw-hf72-3mxw","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:46.420Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-26269","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26269","licence":"Public domain","modified":"2026-06-17T03:07:57.907Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-141","url":"https://osv.dev/vulnerability/PYSEC-2020-141","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:27.809Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-300","url":"https://osv.dev/vulnerability/PYSEC-2020-300","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:27.809Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-335","url":"https://osv.dev/vulnerability/PYSEC-2020-335","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:27.809Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-TENSORFLOW-2020-26269","url":"https://osv.dev/vulnerability/BIT-TENSORFLOW-2020-26269","licence":"Apache-2.0","modified":"2025-05-20T10:02:07.006Z"}],"updatedAt":"2026-11-25T22:57:56.154Z","epss":{"score":0.00697,"percentile":0.54309,"date":"2026-12-01T12:00:22.000Z"}}