CVE-2020-15191: TensorFlow: null ptr deref in dlpack causes remote DoS
MEDIUM PoC AVAILABLETensorFlow versions before 2.2.1/2.3.1 allow unauthenticated remote attackers to crash model serving processes via a crafted dlpack argument — no exploit code needed, just a malformed API call. If you're still running TensorFlow < 2.3.1 in any serving or inference environment, patch now. This is a 2020 vulnerability; if it's unpatched in your environment, treat it as a critical operational gap.
What is the risk?
Despite a medium CVSS score (5.3), the attack profile is concerning: network-accessible, zero privileges required, no user interaction, low complexity. An attacker can reliably crash a TensorFlow inference service from the internet. The blast radius is limited to availability — no code execution or data exposure — but in production ML pipelines, availability directly impacts business continuity. Risk elevates in shared multi-tenant inference environments where one crash affects multiple tenants.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
| leap | — | — | No patch |
How severe is it?
What is the attack surface?
What should I do?
5 steps-
Patch: Upgrade to TensorFlow 2.2.1 or 2.3.1 (commit 22e07fb).
-
Verify: Run
python -c 'import tensorflow as tf; print(tf.__version__)'across all serving and training nodes. -
Interim workaround: Add input validation middleware on TF Serving endpoints to reject malformed dlpack requests; restrict network access to trusted clients only.
-
Detection: Monitor for sudden TF Serving process restarts or OOM crashes correlated with unexpected API traffic patterns — they may indicate exploit attempts.
-
Audit: Check container images and model serving infrastructure for pinned TF versions that may have never been updated.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2020-15191?
TensorFlow versions before 2.2.1/2.3.1 allow unauthenticated remote attackers to crash model serving processes via a crafted dlpack argument — no exploit code needed, just a malformed API call. If you're still running TensorFlow < 2.3.1 in any serving or inference environment, patch now. This is a 2020 vulnerability; if it's unpatched in your environment, treat it as a critical operational gap.
Is CVE-2020-15191 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2020-15191, increasing the risk of exploitation.
How to fix CVE-2020-15191?
1. Patch: Upgrade to TensorFlow 2.2.1 or 2.3.1 (commit 22e07fb). 2. Verify: Run `python -c 'import tensorflow as tf; print(tf.__version__)'` across all serving and training nodes. 3. Interim workaround: Add input validation middleware on TF Serving endpoints to reject malformed dlpack requests; restrict network access to trusted clients only. 4. Detection: Monitor for sudden TF Serving process restarts or OOM crashes correlated with unexpected API traffic patterns — they may indicate exploit attempts. 5. Audit: Check container images and model serving infrastructure for pinned TF versions that may have never been updated.
What systems are affected by CVE-2020-15191?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference pipelines, training pipelines, multi-framework ML deployments.
What is the CVSS score for CVE-2020-15191?
CVE-2020-15191 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.75%.
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 versions 2.2.1 and 2.3.1, if a user passes an invalid argument to `dlpack.to_dlpack` the expected validations will cause variables to bind to `nullptr` while setting a `status` variable to the error condition. However, this `status` argument is not properly checked. Hence, code following these methods will bind references to null pointers. This is undefined behavior and reported as an error if compiling with `-fsanitize=null`. The issue is patched in commit 22e07fb204386768e5bcbea563641ea11f96ceb8 and is released in TensorFlow versions 2.2.1, or 2.3.1.
Exploitation Scenario
An adversary targeting a competitor's ML inference API discovers TensorFlow is in use (via error messages, headers, or public documentation). They craft an HTTP request to the model serving endpoint with an intentionally malformed dlpack tensor descriptor. The invalid argument bypasses input validation, binds internal variables to null pointers, and causes a null pointer dereference crash. The inference service goes down. In a Kubernetes deployment without proper restart policies, this causes an SLA breach. A sophisticated attacker could loop this to create persistent denial of service against a paid ML API service.
Weaknesses (CWE)
CWE-252 Unchecked Return Value
Primary
CWE-20 Improper Input Validation CWE-476 NULL Pointer Dereference CWE-252 — Unchecked Return Value: The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
- [Implementation] Check the results of all functions that return a value and verify that the value is expected.
- [Implementation] For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L References
- lists.opensuse.org/opensuse-security-announce/2020-10/msg00065.html Mailing List 3rd Party
- github.com/tensorflow/tensorflow/commit/22e07fb204386768e5bcbea563641ea11f96ceb8 Patch 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.3.1 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-q8qj-fc9q-cphr 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-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