CVE-2020-15197: TensorFlow: DoS via malformed sparse tensor input
MEDIUM PoC AVAILABLEA 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 |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Patch: upgrade TensorFlow to >= 2.3.1 (fix in commit 3cbb917).
-
If immediate patching is blocked, enforce API-layer validation rejecting sparse tensors with non-rank-2 indices before they reach TF ops.
-
Scope exposure: audit which inference endpoints accept sparse tensor inputs from untrusted users and restrict accordingly.
-
Deploy rate limiting on inference endpoints to break crash-restart abuse loops.
-
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:
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.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:N/A:H References
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow
AI Threat Alert