# CVE-2020-15207: Segfault and data corruption in tensorflow-lite

Source: https://junglewise.ai/threats/cve-2020-15207-segfault-and-data-corruption-in-tensorflow-lite  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-09-25  
License: CC BY 4.0 with a link back

CVE-2020-15207 · Severity: low · CVSS 3.1 · Published 2020-09-25

In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, to mimic Python's indexing with negative values, TFLite uses `ResolveAxis` to convert negative values to positive indices. However, the only check that the converted index is now valid is only present in debug builds. If the `DCHECK` does not trigger, then code execution moves ahead with a negative index. This, in turn, results in accessing data out of bounds which results in segfaults and/or data corruption. The issue is patched in commit 2d88f470dea2671b430884260f3626b1fe99830a, and is released in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.

Technologies: [tensorflow (PyPI)](https://junglewise.ai/threats/technologies/pypi-tensorflow), [tensorflow-cpu (PyPI)](https://junglewise.ai/threats/technologies/tensorflow-cpu), [tensorflow-gpu (PyPI)](https://junglewise.ai/threats/technologies/tensorflow-gpu). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2020-15207 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-15207 being exploited in the wild.

**How severe is CVE-2020-15207?** Low severity, with a CVSS score of 3.1, published 25 September 2020.

**Which products and versions are affected?** tensorflow (PyPI) ECOSYSTEM:introduced=0,fixed=1.15.4, GIT:introduced=0,fixed=2d88f470dea2671b430884260f3626b1fe99830a|ECOSYSTEM:introduced=0,fixed=1.15.4,introduced=2.0.0,fixed=2.0.3,introduced=2.1.0,fixed=2.1.2,introduced=2.2.0,fixed=2.2.1,introduced=2.3.0,fixed=2.3.1; tensorflow-cpu (PyPI) ECOSYSTEM:introduced=0,fixed=1.15.4, GIT:introduced=0,fixed=2d88f470dea2671b430884260f3626b1fe99830a|ECOSYSTEM:introduced=0,fixed=1.15.4,introduced=2.0.0,fixed=2.0.3,introduced=2.1.0,fixed=2.1.2,introduced=2.2.0,fixed=2.2.1,introduced=2.3.0,fixed=2.3.1; tensorflow-gpu (PyPI) ECOSYSTEM:introduced=0,fixed=1.15.4, GIT:introduced=0,fixed=2d88f470dea2671b430884260f3626b1fe99830a|ECOSYSTEM:introduced=0,fixed=1.15.4,introduced=2.0.0,fixed=2.0.3,introduced=2.1.0,fixed=2.1.2,introduced=2.2.0,fixed=2.2.1,introduced=2.3.0,fixed=2.3.1.

**Is there a fix for CVE-2020-15207?** Yes. tensorflow (PyPI): upgrade to 1.15.4, 2.3.1 or later; tensorflow-cpu (PyPI): upgrade to 1.15.4, 2.3.1 or later; tensorflow-gpu (PyPI): upgrade to 1.15.4, 2.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2020-15207?** Check whether you run tensorflow (PyPI), tensorflow-cpu (PyPI) or tensorflow-gpu (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tensorflow (PyPI): upgrade to 1.15.4, 2.3.1 or later

  ```sh
  pip install "tensorflow>=2.3.1"
  ```

- tensorflow-cpu (PyPI): upgrade to 1.15.4, 2.3.1 or later

  ```sh
  pip install "tensorflow-cpu>=2.3.1"
  ```

- tensorflow-gpu (PyPI): upgrade to 1.15.4, 2.3.1 or later

  ```sh
  pip install "tensorflow-gpu>=2.3.1"
  ```


## Affected products

- tensorflow (PyPI) ECOSYSTEM:introduced=0,fixed=1.15.4, GIT:introduced=0,fixed=2d88f470dea2671b430884260f3626b1fe99830a|ECOSYSTEM:introduced=0,fixed=1.15.4,introduced=2.0.0,fixed=2.0.3,introduced=2.1.0,fixed=2.1.2,introduced=2.2.0,fixed=2.2.1,introduced=2.3.0,fixed=2.3.1
- tensorflow-cpu (PyPI) ECOSYSTEM:introduced=0,fixed=1.15.4, GIT:introduced=0,fixed=2d88f470dea2671b430884260f3626b1fe99830a|ECOSYSTEM:introduced=0,fixed=1.15.4,introduced=2.0.0,fixed=2.0.3,introduced=2.1.0,fixed=2.1.2,introduced=2.2.0,fixed=2.2.1,introduced=2.3.0,fixed=2.3.1
- tensorflow-gpu (PyPI) ECOSYSTEM:introduced=0,fixed=1.15.4, GIT:introduced=0,fixed=2d88f470dea2671b430884260f3626b1fe99830a|ECOSYSTEM:introduced=0,fixed=1.15.4,introduced=2.0.0,fixed=2.0.3,introduced=2.1.0,fixed=2.1.2,introduced=2.2.0,fixed=2.2.1,introduced=2.3.0,fixed=2.3.1

## Identifiers

- CVE-2020-15207
- GHSA-q4qf-3fc6-8x34
- PYSEC-2020-130
- PYSEC-2020-287
- PYSEC-2020-322

## Related threats

- [PYSEC-2026-3331 - TensorFlow has segfault in array_ops.upper_bound](https://junglewise.ai/threats/cve-2023-33976-tensorflow-has-segfault-in-array-ops-upper-bound)
- [PYSEC-2026-3182 - TensorFlow Denial of Service vulnerability](https://junglewise.ai/threats/cve-2023-25661-tensorflow-denial-of-service-vulnerability)
- [PYSEC-2026-3300 - TensorFlow vulnerable to Out-of-Bounds Read in DynamicStitch](https://junglewise.ai/threats/cve-2023-25659-tensorflow-vulnerable-to-out-of-bounds-read-in-dynamicstitch)
- [PYSEC-2026-3362 - TensorFlow vulnerable to seg fault in `tf.raw_ops.Print`](https://junglewise.ai/threats/cve-2023-25660-tensorflow-vulnerable-to-seg-fault-in-tf-raw-ops-print)
- [PYSEC-2026-3293 - TensorFlow vulnerable to integer overflow in EditDistance](https://junglewise.ai/threats/cve-2023-25662-tensorflow-vulnerable-to-integer-overflow-in-editdistance)
