CVE-2020-15199: TensorFlow: DoS via malformed ragged tensor input
MEDIUM PoC AVAILABLETensorFlow deployments below 2.3.1 accepting user-supplied tensor data are vulnerable to remote crash via a crafted ragged tensor — no authentication required. Patch to TF 2.3.1+ immediately; if patching is delayed, add input validation at the API boundary to reject splits tensors with fewer than 2 elements. Availability impact only: no data exposure, but a crashed inference server stops production pipelines cold.
What is the risk?
Effective risk is moderate-to-low despite the network attack vector. High attack complexity (AC:H) requires the adversary to understand TensorFlow's ragged tensor format and specifically target RaggedCountSparseOutput — this is not spray-and-pray. The CVE is from 2020, unpatched instances are increasingly rare, and it is absent from CISA KEV. The primary business risk materializes in exposed model-serving endpoints where inference availability is operationally critical (e.g., real-time fraud detection, content moderation at scale). On-prem or air-gapped training environments with no external input path carry negligible risk.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
Patch: upgrade to TensorFlow 2.3.1 or later (commit 3cbb917b applies the fix).
-
Workaround if patching is blocked: add input validation middleware at the model serving layer to assert len(splits) >= 2 before forwarding requests to the TF runtime.
-
Network controls: restrict public access to TF Serving ports; place an authenticated API gateway in front of inference endpoints to reduce unauthenticated attack surface.
-
Detection: monitor serving process restart rates and SIGABRT/segfault logs as anomaly signals; alert on unusually short-lived inference processes.
-
Verify exposure: grep your codebase and pipeline configs for RaggedCountSparseOutput usage to confirm affected code paths.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2020-15199?
TensorFlow deployments below 2.3.1 accepting user-supplied tensor data are vulnerable to remote crash via a crafted ragged tensor — no authentication required. Patch to TF 2.3.1+ immediately; if patching is delayed, add input validation at the API boundary to reject splits tensors with fewer than 2 elements. Availability impact only: no data exposure, but a crashed inference server stops production pipelines cold.
Is CVE-2020-15199 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2020-15199, increasing the risk of exploitation.
How to fix CVE-2020-15199?
1. Patch: upgrade to TensorFlow 2.3.1 or later (commit 3cbb917b applies the fix). 2. Workaround if patching is blocked: add input validation middleware at the model serving layer to assert len(splits) >= 2 before forwarding requests to the TF runtime. 3. Network controls: restrict public access to TF Serving ports; place an authenticated API gateway in front of inference endpoints to reduce unauthenticated attack surface. 4. Detection: monitor serving process restart rates and SIGABRT/segfault logs as anomaly signals; alert on unusually short-lived inference processes. 5. Verify exposure: grep your codebase and pipeline configs for RaggedCountSparseOutput usage to confirm affected code paths.
What systems are affected by CVE-2020-15199?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, batch inference.
What is the CVSS score for CVE-2020-15199?
CVE-2020-15199 has a CVSS v3.1 base score of 5.9 (MEDIUM). The EPSS exploitation probability is 0.80%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
In Tensorflow before version 2.3.1, the `RaggedCountSparseOutput` does not validate that the input arguments form a valid ragged tensor. In particular, there is no validation that the `splits` tensor has the minimum required number of elements. Code uses this quantity to initialize a different data structure. Since `BatchedMap` is equivalent to a vector, it needs to have at least one element to not be `nullptr`. If user passes a `splits` tensor that is empty or has exactly one element, we get a `SIGABRT` signal raised by the operating system. The issue is patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.
Exploitation Scenario
An adversary identifies a public-facing model API (e.g., a text classification or recommendation endpoint) backed by TensorFlow <2.3.1. They craft a minimal gRPC or REST request to the model that includes a RaggedTensor with an empty splits component (e.g., splits=[]). When TensorFlow processes this through RaggedCountSparseOutput during inference, the BatchedMap initialization dereferences a null pointer and the OS sends SIGABRT, crashing the process. The adversary automates this with a single-line script, cycling requests to keep the serving pod in a crash loop, causing sustained inference unavailability without authentication or elevated privileges.
Weaknesses (CWE)
CWE-20 — Improper Input Validation: The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
- [Architecture and Design] Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build "recognizers" for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111]
- [Architecture and Design] Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
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 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