CVE-2020-15198: TensorFlow: heap OOB in SparseCountSparseOutput ops

MEDIUM PoC AVAILABLE
Published September 25, 2020
CISO Take

This 2020 TensorFlow vulnerability allows network-accessible model serving endpoints to be crashed or potentially exploited via malformed sparse tensor inputs. If your ML infrastructure still runs TensorFlow < 2.3.1, patch immediately — this is a straightforward version bump. For teams on modern TF versions, no action required beyond confirming you are not running legacy inference infrastructure.

Risk Assessment

Risk is LOW for patched environments but MEDIUM for legacy ML serving deployments that may still run TF 2.3.0 or earlier. CVSS 5.4 with AC:High means exploitation requires deliberate crafting of malformed inputs, reducing opportunistic risk. However, AI/ML serving APIs often lack input validation layers, making them more susceptible than traditional web services. The network attack vector with no privilege requirement means any caller with API access to a TF serving endpoint is a potential threat actor.

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.4 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 38% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Advanced
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 Changed
C Low
I Low
A None

Recommended Action

5 steps
  1. PATCH

    Upgrade TensorFlow to >= 2.3.1 immediately on all training and serving infrastructure.

  2. AUDIT

    Inventory all TF versions across MLOps pipelines using 'pip show tensorflow' or container image scanning.

  3. VALIDATE INPUTS

    Add input shape validation at the serving layer — reject requests where indices and values tensors have mismatched shapes before they reach the TF runtime.

  4. ISOLATE

    Run TF serving processes in containers/VMs with restricted memory and without network egress to limit blast radius of exploitation.

  5. DETECT

    Alert on unexpected process crashes in TF serving pods — heap corruption often manifests as SIGABRT/SIGSEGV.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
8.4 - AI system security
NIST AI RMF
MANAGE 2.2 - Mechanisms for detecting, responding to, and recovering from vulnerabilities MAP 1.5 - Organizational risk tolerance

Frequently Asked Questions

What is CVE-2020-15198?

This 2020 TensorFlow vulnerability allows network-accessible model serving endpoints to be crashed or potentially exploited via malformed sparse tensor inputs. If your ML infrastructure still runs TensorFlow < 2.3.1, patch immediately — this is a straightforward version bump. For teams on modern TF versions, no action required beyond confirming you are not running legacy inference infrastructure.

Is CVE-2020-15198 actively exploited?

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

How to fix CVE-2020-15198?

1. PATCH: Upgrade TensorFlow to >= 2.3.1 immediately on all training and serving infrastructure. 2. AUDIT: Inventory all TF versions across MLOps pipelines using 'pip show tensorflow' or container image scanning. 3. VALIDATE INPUTS: Add input shape validation at the serving layer — reject requests where indices and values tensors have mismatched shapes before they reach the TF runtime. 4. ISOLATE: Run TF serving processes in containers/VMs with restricted memory and without network egress to limit blast radius of exploitation. 5. DETECT: Alert on unexpected process crashes in TF serving pods — heap corruption often manifests as SIGABRT/SIGSEGV.

What systems are affected by CVE-2020-15198?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, data preprocessing pipelines, recommendation system backends.

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

CVE-2020-15198 has a CVSS v3.1 base score of 5.4 (MEDIUM). The EPSS exploitation probability is 0.17%.

Technical Details

NVD Description

In Tensorflow before version 2.3.1, the `SparseCountSparseOutput` implementation does not validate that the input arguments form a valid sparse tensor. In particular, there is no validation that the `indices` tensor has the same shape as the `values` one. The values in these tensors are always accessed in parallel. Thus, a shape mismatch can result in accesses outside the bounds of heap allocated buffers. The issue is patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.

Exploitation Scenario

An adversary targeting an organization running a recommendation system on TF 2.3.0 identifies the TF Serving REST endpoint. They craft a predict request containing a sparse tensor where the indices shape is [100, 2] but the values shape is [10] — a deliberate mismatch. The SparseCountSparseOutput op accesses both tensors in parallel without bounds checking, triggering an out-of-bounds heap read/write. In the minimal exploitation path, the service crashes (DoS for the recommendation pipeline). In a more targeted scenario with heap layout knowledge, the adversary may achieve partial memory read to extract in-memory model weights or user data cached in the serving process.

CVSS Vector

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

Timeline

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

Related Vulnerabilities