{"id":"CVE-2020-26269","aliases":["BIT-tensorflow-2020-26269","EUVD-2020-0216","GHSA-9jjw-hf72-3mxw","PYSEC-2020-141","PYSEC-2020-300","PYSEC-2020-335"],"status":"published","title":"Heap out of bounds read in filesystem glob matching in TensorFlow","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.00697,"percentile":0.5349,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-125"],"published":"2020-12-10T22:10:28Z","modified":"2026-10-20T14:08:49Z","fixes":[{"ecosystem":"PyPI","package":"tensorflow","fixed_in":["2.4.0"],"sources":["ghsa","osv"]},{"ecosystem":"PyPI","package":"tensorflow-cpu","fixed_in":["2.4.0"],"sources":["ghsa","osv"]},{"ecosystem":"PyPI","package":"tensorflow-gpu","fixed_in":["2.4.0"],"sources":["ghsa","osv"]},{"ecosystem":"Bitnami","package":"tensorflow","fixed_in":["2.4.0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"tensorflow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"tensorflow-cpu","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"tensorflow-gpu","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"tensorflow","ranges":[{"type":"SEMVER","events":[{"introduced":"2.4.0-rc0"},{"fixed":"2.4.0"},{"introduced":"2.4.0-rc1"},{"fixed":"2.4.0"},{"introduced":"2.4.0-rc2"},{"fixed":"2.4.0"},{"introduced":"2.4.0-rc3"},{"fixed":"2.4.0"},{"introduced":"2.4.0-rc4"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"tensorflow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"tensorflow-cpu","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"tensorflow-gpu","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"tensorflow","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"}]},{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}],"versions":["2.4.0rc0","2.4.0rc1","2.4.0rc2","2.4.0rc3","2.4.0rc4"]},{"source":"osv","ecosystem":"PyPI","package":"tensorflow-cpu","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"}]},{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"tensorflow-gpu","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"8b5b9dc96666a3a5d27fad7179ff215e3b74b67c"}]},{"type":"ECOSYSTEM","events":[{"introduced":"2.4.0rc0"},{"fixed":"2.4.0"}]}]}],"products":[{"vendor":"google","product":"tensorflow"},{"vendor":"tensorflow","product":"tensorflow"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9jjw-hf72-3mxw","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","Third Party Advisory","web","fix","advisory"]},{"url":"https://github.com/tensorflow/tensorflow/commit/8b5b9dc96666a3a5d27fad7179ff215e3b74b67c","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26269","tags":["web","advisory"]},{"url":"https://github.com/tensorflow/tensorflow/pull/40861","tags":["web"]},{"url":"https://github.com/tensorflow/tensorflow/pull/44310","tags":["web"]},{"url":"https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L106","tags":["web"]},{"url":"https://github.com/tensorflow/tensorflow/blob/458c6260265c46ebaf18052d6c61aea4b6b40926/tensorflow/core/platform/file_system_helper.cc#L127","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-300.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-335.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-141.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9jjw-hf72-3mxw"},{"url":"https://github.com/tensorflow/tensorflow","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-26269","title":"Heap out of bounds read in filesystem glob matching in TensorFlow","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.","status":"published","published":"2020-12-10T22:10:28Z","modified":"2024-08-04T15:56:04.075Z","cwes":["CWE-125"],"updated_at":"2026-11-02T14:35:46.129376Z"}],"euvd":[{"id":"EUVD-2020-0216","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.","status":"published","published":"2020-12-10T22:10:28Z","modified":"2024-08-04T15:56:04Z","updated_at":"2026-11-03T03:07:15.15938Z"}],"ghsa":[{"id":"GHSA-9jjw-hf72-3mxw","title":"TensorFlow vulnerable to heap out of bounds read in filesystem glob matching","description":"### 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-\u003eMatch(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\u003e\u003e\u003e 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.","status":"published","published":"2022-10-07T07:22:33Z","modified":"2024-10-30T21:23:20Z","cvss":[{"version":"4.0","score":7.2,"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","level":"high"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","level":"critical"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:38:14.769863Z"}],"nvd":[{"id":"CVE-2020-26269","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.","status":"published","published":"2020-12-10T23:15:12.91Z","modified":"2026-06-17T03:07:57.907Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:06:27.10541Z"}],"osv":[{"id":"CVE-2020-26269","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.","status":"published","published":"2020-12-10T23:15:12.91Z","modified":"2026-10-20T14:08:49.695500479Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:16.248747Z"},{"id":"GHSA-9jjw-hf72-3mxw","title":"TensorFlow vulnerable to heap out of bounds read in filesystem glob matching","description":"### 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-\u003eMatch(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\u003e\u003e\u003e 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.","status":"published","published":"2022-10-07T07:22:33Z","modified":"2026-09-10T03:49:46.420066944Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","level":"critical"},{"version":"4.0","score":7.2,"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","level":"high"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T15:46:43.875515Z"},{"id":"BIT-tensorflow-2020-26269","title":"Heap out of bounds read in filesystem glob matching in TensorFlow","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.","status":"published","published":"2024-03-06T11:20:14.848Z","modified":"2025-05-20T10:02:07.006Z","updated_at":"2026-11-02T15:28:35.51001Z"},{"id":"PYSEC-2020-141","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.","status":"published","published":"2020-12-10T23:15:00Z","modified":"2023-12-06T01:00:27.809388Z","updated_at":"2026-11-02T15:52:52.192131Z"},{"id":"PYSEC-2020-300","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.","status":"published","published":"2020-12-10T23:15:00Z","modified":"2023-12-06T01:00:27.809388Z","updated_at":"2026-11-02T15:52:52.682031Z"},{"id":"PYSEC-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.","status":"published","published":"2020-12-10T23:15:00Z","modified":"2023-12-06T01:00:27.809388Z","updated_at":"2026-11-02T15:52:52.682031Z"}]}}
