{"id":"CVE-2020-26269","aliases":["GHSA-9jjw-hf72-3mxw","BIT-tensorflow-2020-26269","PYSEC-2020-141","PYSEC-2020-300","PYSEC-2020-335"],"title":"TensorFlow vulnerable to heap out of bounds read in filesystem glob matching","summary":"TensorFlow vulnerable to heap out of bounds read in filesystem glob matching","severity":"critical","cvss":9.1,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","vendor":"tensorflow","product":"tensorflow","ecosystem":"pip","affected":["tensorflow >= 2.4.0rc0, < 2.4.0","tensorflow-cpu >= 2.4.0rc0, < 2.4.0","tensorflow-gpu >= 2.4.0rc0, < 2.4.0"],"patched":["tensorflow 2.4.0","tensorflow-cpu 2.4.0","tensorflow-gpu 2.4.0"],"published":"2022-10-07","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:49:46.420066944Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-9jjw-hf72-3mxw","references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9jjw-hf72-3mxw"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26269"},{"url":"https://github.com/tensorflow/tensorflow/pull/40861"},{"url":"https://github.com/tensorflow/tensorflow/pull/44310"},{"url":"https://github.com/tensorflow/tensorflow/commit/8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-300.yaml"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-335.yaml"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-141.yaml"},{"url":"https://github.com/tensorflow/tensorflow"},{"url":"https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L106"},{"url":"https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L127"}],"tags":["osv","pip"],"epss":0.00697,"epssPercentile":0.51207,"ingestedAt":"2026-09-12T03:13:01.684Z","slug":"CVE-2020-26269","body":"## Overview\n\n### 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.\n\n## Affected packages\n\n- `tensorflow >= 2.4.0rc0, < 2.4.0`\n- `tensorflow-cpu >= 2.4.0rc0, < 2.4.0`\n- `tensorflow-gpu >= 2.4.0rc0, < 2.4.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `tensorflow 2.4.0`\n- `tensorflow-cpu 2.4.0`\n- `tensorflow-gpu 2.4.0`","depth":"midnight","depthScore":50,"depthScoreParts":{"impact":50.1,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}