CVE-2020-15197: TensorFlow: DoS via malformed sparse tensor input

MEDIUM PoC AVAILABLE
Published September 25, 2020
CISO Take

A missing rank validation in TensorFlow's SparseCountSparseOutput operation allows low-privileged network attackers to crash TF serving instances by sending malformed sparse tensors. If your ML inference infrastructure exposes TensorFlow endpoints to untrusted users, patch to 2.3.1 immediately. Add API-boundary input shape validation as a secondary control until patching is complete.

Risk Assessment

Medium risk in practice despite a 6.3 CVSS. High attack complexity and low-privilege requirement reduce exploitability, but model serving endpoints that accept raw tensor inputs from users are directly exposed. The Changed scope (S:C) signals cross-component blast radius—one malformed request can crash a shared inference server affecting all tenants. No confidentiality or integrity impact; purely an availability threat. Not in CISA KEV and no public PoC weaponization reported, but the GitHub advisory includes exploit details.

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
6.3 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 44% 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 Low
UI None
S Changed
C None
I None
A High

Recommended Action

5 steps
  1. Patch: upgrade TensorFlow to >= 2.3.1 (fix in commit 3cbb917).

  2. If immediate patching is blocked, enforce API-layer validation rejecting sparse tensors with non-rank-2 indices before they reach TF ops.

  3. Scope exposure: audit which inference endpoints accept sparse tensor inputs from untrusted users and restrict accordingly.

  4. Deploy rate limiting on inference endpoints to break crash-restart abuse loops.

  5. Detection: monitor TF serving logs and process supervisor events for CHECK assertion failures or unexpected restarts as an IOC signal.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 9 - Risk management system
ISO 42001
A.9.4 - AI system operation and monitoring
NIST AI RMF
MANAGE-2.2 - Mechanisms to sustain AI operation
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2020-15197?

A missing rank validation in TensorFlow's SparseCountSparseOutput operation allows low-privileged network attackers to crash TF serving instances by sending malformed sparse tensors. If your ML inference infrastructure exposes TensorFlow endpoints to untrusted users, patch to 2.3.1 immediately. Add API-boundary input shape validation as a secondary control until patching is complete.

Is CVE-2020-15197 actively exploited?

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

How to fix CVE-2020-15197?

1. Patch: upgrade TensorFlow to >= 2.3.1 (fix in commit 3cbb917). 2. If immediate patching is blocked, enforce API-layer validation rejecting sparse tensors with non-rank-2 indices before they reach TF ops. 3. Scope exposure: audit which inference endpoints accept sparse tensor inputs from untrusted users and restrict accordingly. 4. Deploy rate limiting on inference endpoints to break crash-restart abuse loops. 5. Detection: monitor TF serving logs and process supervisor events for CHECK assertion failures or unexpected restarts as an IOC signal.

What systems are affected by CVE-2020-15197?

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

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

CVE-2020-15197 has a CVSS v3.1 base score of 6.3 (MEDIUM). The EPSS exploitation probability is 0.22%.

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 rank 2. This tensor must be a matrix because code assumes its elements are accessed as elements of a matrix. However, malicious users can pass in tensors of different rank, resulting in a `CHECK` assertion failure and a crash. This can be used to cause denial of service in serving installations, if users are allowed to control the components of the input sparse tensor. The issue is patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.

Exploitation Scenario

An authenticated user with minimal privileges submits an inference request to a TensorFlow serving endpoint that processes SparseCountSparseOutput. The attacker crafts a sparse tensor with a rank-1 or rank-3 indices tensor instead of the required rank-2 matrix. TensorFlow dereferences indices as a matrix, hits a CHECK assertion failure, and the serving process crashes. In containerized deployments with auto-restart, the attacker scripts repeated requests to sustain a denial of service, preventing any inference requests from completing. The attack requires knowledge of TensorFlow's sparse tensor API but no ML expertise.

Weaknesses (CWE)

CVSS Vector

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

Timeline

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

Related Vulnerabilities