# CVE-2020-15202: Integer truncation in Shard API usage

- Severity: Critical 9.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.29%, higher than 71% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2020-09-25T18:28:35.000Z
- Modified: 2026-09-08T08:48:19.934Z
- Also known as: GHSA-h6fg-mjxg-hqq4, BIT-TENSORFLOW-2020-15202, PYSEC-2020-125, PYSEC-2020-282, PYSEC-2020-317
- Weaknesses: CWE-197, CWE-754
- Assigned by: GitHub_M

## Description

In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the `Shard` API in TensorFlow expects the last argument to be a function taking two `int64` (i.e., `long long`) arguments. However, there are several places in TensorFlow where a lambda taking `int` or `int32` arguments is being used. In these cases, if the amount of work to be parallelized is large enough, integer truncation occurs. Depending on how the two arguments of the lambda are used, this can result in segfaults, read/write outside of heap allocated arrays, stack overflows, or data corruption. The issue is patched in commits 27b417360cbd671ef55915e4bb6bb06af8b8a832 and ca8c013b5e97b1373b3bb1c97ea655e69f31a575, and is released in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.

(As written by CVE List.)

## Affected

- tensorflow tensorflow: < 1.15.4; >= 2.0.0, < 2.0.3; >= 2.1.0, < 2.1.2; >= 2.2.0, < 2.2.1; >= 2.3.0, < 2.3.1
- tensorflow (PyPI): before 1.15.4; from 2.0.0 before 2.0.3; from 2.1.0 before 2.1.2; from 2.2.0 before 2.2.1; from 2.3.0 before 2.3.1; before 27b417360cbd671ef55915e4bb6bb06af8b8a832; before ca8c013b5e97b1373b3bb1c97ea655e69f31a575
- tensorflow-cpu (PyPI): before 1.15.4; from 2.0.0 before 2.0.3; from 2.1.0 before 2.1.2; from 2.2.0 before 2.2.1; from 2.3.0 before 2.3.1; before 27b417360cbd671ef55915e4bb6bb06af8b8a832; before ca8c013b5e97b1373b3bb1c97ea655e69f31a575
- tensorflow-gpu (PyPI): before 1.15.4; from 2.0.0 before 2.0.3; from 2.1.0 before 2.1.2; from 2.2.0 before 2.2.1; from 2.3.0 before 2.3.1; before 27b417360cbd671ef55915e4bb6bb06af8b8a832; before ca8c013b5e97b1373b3bb1c97ea655e69f31a575
- google tensorflow: before 1.15.4; from 2.0.0 before 2.0.3; from 2.1.0 before 2.1.2; from 2.2.0 before 2.2.1; from 2.3.0 before 2.3.1
- opensuse leap: 15.2
- tensorflow (Bitnami): before 1.15.4; from 2.0.0 before 2.0.3; from 2.1.0 before 2.1.2; from 2.2.0 before 2.2.1; from 2.3.0 before 2.3.1

## Every score

- GitHub_M: CVSS:3.1 9.0 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.0 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H`
- NVD: CVSS:3.1 9.0 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/tensorflow/tensorflow/security/advisories/GHSA-h6fg-mjxg-hqq4> (exploit, advisory, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/releases/tag/v2.3.1> (advisory, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/commit/27b417360cbd671ef55915e4bb6bb06af8b8a832> (advisory, fix, patch, third-party-advisory, web)
- <https://github.com/tensorflow/tensorflow/commit/ca8c013b5e97b1373b3bb1c97ea655e69f31a575> (advisory, fix, patch, third-party-advisory, web)
- <http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00065.html> (advisory, mailing-list, third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-15202> (advisory, web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-282.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-317.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-125.yaml> (web)
- <https://github.com/tensorflow/tensorflow> (package)

## Sources

- CVE List: [CVE-2020-15202](https://www.cve.org/CVERecord?id=CVE-2020-15202), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-h6fg-mjxg-hqq4](https://github.com/advisories/GHSA-h6fg-mjxg-hqq4), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2020-15202](https://nvd.nist.gov/vuln/detail/CVE-2020-15202), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2020-125](https://osv.dev/vulnerability/PYSEC-2020-125), CC-BY-4.0, modified 2023-12-06
- PyPA Advisory Database: [PYSEC-2020-282](https://osv.dev/vulnerability/PYSEC-2020-282), CC-BY-4.0, modified 2023-12-06
- PyPA Advisory Database: [PYSEC-2020-317](https://osv.dev/vulnerability/PYSEC-2020-317), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-TENSORFLOW-2020-15202](https://osv.dev/vulnerability/BIT-TENSORFLOW-2020-15202), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2020-15202 · Whole record: https://cve.day/CVE-2020-15202.json · Rebuilt by cve.day 2026-11-25T22:57:54.951Z
