CVE-2020-15200: TensorFlow: heap overflow in RaggedCountSparseOutput DoS
MEDIUM PoC AVAILABLEMedium-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.
Risk Assessment
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.
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 or later (commit 3cbb917b).
-
Input validation
Enforce that
splits[0] == 0and splits generate a valid partition of the values tensor before processing. -
Network segmentation
Ensure TF Serving endpoints are not directly internet-exposed; place behind authenticated API gateways.
-
Detection
Monitor TF serving logs and container restart rates for unexpected segfaults or OOM signals — repeated crashes on specific inputs may indicate exploitation attempts.
-
Container hygiene
Run TF serving containers with restricted capabilities and memory limits to reduce blast radius of any memory corruption.
Classification
Compliance Impact
This CVE is relevant to:
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.28%.
Technical Details
NVD Description
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)
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
AI Threat Alert