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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 2d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
5.9 / 10
EPSS
0.8%
chance of exploitation in 30 days
Higher than 53% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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.

How is it classified?

Which compliance frameworks are affected?

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.84%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference APIsfeature preprocessing pipelines

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art.15, Art.9
ISO 42001: 8.4
NIST AI RMF: MANAGE-2.2

What are the technical details?

Original Advisory

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.

Weaknesses (CWE)

CWE-787 — Out-of-bounds Write: The product writes data past the end, or before the beginning, of the intended buffer.

  • [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
  • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.

Source: MITRE CWE corpus.

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