CVE-2020-15200: TensorFlow: heap overflow in RaggedCountSparseOutput DoS

MEDIUM PoC AVAILABLE
Published September 25, 2020
CISO Take

Medium-severity DoS vulnerability in TensorFlow's ragged tensor ops — if your ML inference APIs accept user-supplied sparse/ragged tensor inputs and run TF < 2.3.1, a crafted payload can crash the serving process. Patch to TF 2.3.1+; no active exploitation observed and high attack complexity limits real-world risk. Prioritize if you expose TF serving endpoints to untrusted clients.

Risk Assessment

Effective risk is moderate-low. CVSS 5.9 (AV:N/AC:H) reflects that exploitation requires deliberate crafting of malformed ragged tensor splits, not opportunistic attacks. Primary confirmed impact is availability (segfault/process crash); heap buffer overflow theoretically enables RCE but no working exploit for code execution has been published. Risk spikes for organizations exposing TensorFlow serving endpoints directly to untrusted networks or accepting external tensor payloads without sanitization.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
5.9 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 51% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC High
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  1. Patch

    Upgrade TensorFlow to 2.3.1 or later (commit 3cbb917b).

  2. Input validation

    Enforce that splits[0] == 0 and splits generate a valid partition of the values tensor before processing.

  3. Network segmentation

    Ensure TF Serving endpoints are not directly internet-exposed; place behind authenticated API gateways.

  4. Detection

    Monitor TF serving logs and container restart rates for unexpected segfaults or OOM signals — repeated crashes on specific inputs may indicate exploitation attempts.

  5. Container hygiene

    Run TF serving containers with restricted capabilities and memory limits to reduce blast radius of any memory corruption.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art.15 - Accuracy, robustness and cybersecurity Art.9 - Risk management system
ISO 42001
8.4 - AI system risk management
NIST AI RMF
MANAGE-2.2 - Mechanisms for responding to identified AI risks

Frequently Asked Questions

What is CVE-2020-15200?

Medium-severity DoS vulnerability in TensorFlow's ragged tensor ops — if your ML inference APIs accept user-supplied sparse/ragged tensor inputs and run TF < 2.3.1, a crafted payload can crash the serving process. Patch to TF 2.3.1+; no active exploitation observed and high attack complexity limits real-world risk. Prioritize if you expose TF serving endpoints to untrusted clients.

Is CVE-2020-15200 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2020-15200, increasing the risk of exploitation.

How to fix CVE-2020-15200?

1. **Patch**: Upgrade TensorFlow to 2.3.1 or later (commit 3cbb917b). 2. **Input validation**: Enforce that `splits[0] == 0` and splits generate a valid partition of the values tensor before processing. 3. **Network segmentation**: Ensure TF Serving endpoints are not directly internet-exposed; place behind authenticated API gateways. 4. **Detection**: Monitor TF serving logs and container restart rates for unexpected segfaults or OOM signals — repeated crashes on specific inputs may indicate exploitation attempts. 5. **Container hygiene**: Run TF serving containers with restricted capabilities and memory limits to reduce blast radius of any memory corruption.

What systems are affected by CVE-2020-15200?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference APIs, feature preprocessing pipelines.

What is the CVSS score for CVE-2020-15200?

CVE-2020-15200 has a CVSS v3.1 base score of 5.9 (MEDIUM). The EPSS exploitation probability is 0.28%.

Technical Details

NVD Description

In Tensorflow before version 2.3.1, the `RaggedCountSparseOutput` implementation does not validate that the input arguments form a valid ragged tensor. In particular, there is no validation that the values in the `splits` tensor generate a valid partitioning of the `values` tensor. Thus, the code sets up conditions to cause a heap buffer overflow. A `BatchedMap` is equivalent to a vector where each element is a hashmap. However, if the first element of `splits_values` is not 0, `batch_idx` will never be 1, hence there will be no hashmap at index 0 in `per_batch_counts`. Trying to access that in the user code results in a segmentation fault. The issue is patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.

Exploitation Scenario

Attacker targets a recommendation or NLP inference API backed by TensorFlow Serving. They submit a crafted `RaggedTensor` payload via the gRPC API where `splits_values[0] != 0`, causing `batch_idx` to never reach 1. The code attempts to access index 0 of `per_batch_counts` which is empty, triggering a segmentation fault. The TF Serving process crashes and the container restarts. By automating repeated requests with crafted payloads, the attacker keeps the inference pod in a crash loop, effectively taking the ML inference layer offline and degrading dependent services.

CVSS Vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
September 25, 2020
Last Modified
November 21, 2024
First Seen
September 25, 2020

Related Vulnerabilities