CVE-2020-15195: TensorFlow: heap overflow in sparse gradient op
HIGH PoC AVAILABLEAny TensorFlow deployment below versions 1.15.4/2.0.3/2.1.2/2.2.1/2.3.1 that processes sparse tensors—whether in training or serving—is vulnerable to heap buffer overflow exploitable by a low-privileged network attacker. Patch immediately; no workaround neutralizes the underlying memory corruption. Audit your ML infrastructure inventory now—unpatched TF instances represent a known, multi-year exposure with public exploit details.
Risk Assessment
High risk for organizations running TensorFlow Serving APIs accessible to authenticated-but-untrusted users, or operating multi-tenant ML training platforms. CVSS 8.8 with network vector and low privilege requirement makes this broadly exploitable without user interaction. Although published in 2020, organizations with unmanaged ML dependency sprawl or containerized training infrastructure running pinned-old TF versions remain exposed. No KEV listing but public PoC exists via GitHub advisory.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
| leap | — | — | No patch |
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade to TensorFlow 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1 across all environments (dev, staging, prod).
-
AUDIT
Run dependency scan across containerized ML workloads—pinned base images frequently carry stale TF versions.
-
NETWORK ISOLATION
Restrict TensorFlow Serving endpoints to internal network segments; eliminate public-facing inference APIs where not business-critical.
-
INPUT VALIDATION
Enforce server-side bounds checking on sparse tensor indices before forwarding to TF ops.
-
MONITOR
Alert on anomalous ML worker crashes or OOM events—heap corruption precedes successful exploitation with observable signals.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2020-15195?
Any TensorFlow deployment below versions 1.15.4/2.0.3/2.1.2/2.2.1/2.3.1 that processes sparse tensors—whether in training or serving—is vulnerable to heap buffer overflow exploitable by a low-privileged network attacker. Patch immediately; no workaround neutralizes the underlying memory corruption. Audit your ML infrastructure inventory now—unpatched TF instances represent a known, multi-year exposure with public exploit details.
Is CVE-2020-15195 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2020-15195, increasing the risk of exploitation.
How to fix CVE-2020-15195?
1. PATCH: Upgrade to TensorFlow 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1 across all environments (dev, staging, prod). 2. AUDIT: Run dependency scan across containerized ML workloads—pinned base images frequently carry stale TF versions. 3. NETWORK ISOLATION: Restrict TensorFlow Serving endpoints to internal network segments; eliminate public-facing inference APIs where not business-critical. 4. INPUT VALIDATION: Enforce server-side bounds checking on sparse tensor indices before forwarding to TF ops. 5. MONITOR: Alert on anomalous ML worker crashes or OOM events—heap corruption precedes successful exploitation with observable signals.
What systems are affected by CVE-2020-15195?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, recommendation system pipelines, multi-tenant ML platforms, NLP sparse embedding pipelines.
What is the CVSS score for CVE-2020-15195?
CVE-2020-15195 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.36%.
Technical Details
NVD Description
In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the implementation of `SparseFillEmptyRowsGrad` uses a double indexing pattern. It is possible for `reverse_index_map(i)` to be an index outside of bounds of `grad_values`, thus resulting in a heap buffer overflow. The issue is patched in commit 390611e0d45c5793c7066110af37c8514e6a6c54, and is released in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.
Exploitation Scenario
An adversary with valid credentials to a TensorFlow Serving gRPC/REST endpoint submits a crafted predict request containing a sparse tensor where reverse_index_map holds out-of-bounds indices relative to grad_values. During backward-pass computation in SparseFillEmptyRowsGrad, TensorFlow dereferences these indices beyond heap-allocated buffer boundaries. The resulting heap corruption can be weaponized to achieve arbitrary code execution on the serving node—enabling the attacker to exfiltrate proprietary model weights, inject backdoored model artifacts into the serving pipeline, or pivot to internal training infrastructure connected to the same network segment.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
- lists.opensuse.org/opensuse-security-announce/2020-10/msg00065.html Mailing List 3rd Party
- github.com/tensorflow/tensorflow/commit/390611e0d45c5793c7066110af37c8514e6a6c54 Patch 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.3.1 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-63xm-rx5p-xvqr Exploit 3rd Party
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
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