CVE-2020-15191: TensorFlow: null ptr deref in dlpack causes remote DoS

MEDIUM PoC AVAILABLE
Published September 25, 2020
CISO Take

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.

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
195.8K OpenSSF 7.1 3.7K dependents Pushed 2d ago 4% patched ~1372d to patch Full package profile →
leap No patch

How severe is it?

CVSS 3.1
5.3 / 10
EPSS
0.7%
chance of exploitation in 30 days
Higher than 50% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A Low

What should I do?

5 steps
  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.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 9 - Risk Management System
ISO 42001
A.6.2.5 - AI system vulnerability management
NIST AI RMF
GOVERN 1.4 - Organizational roles and responsibilities for AI risk MANAGE 2.2 - Mechanisms to update and patch AI systems

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

model servinginference pipelinestraining pipelinesmulti-framework ML deployments

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 9
ISO 42001: A.6.2.5
NIST AI RMF: GOVERN 1.4, MANAGE 2.2

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: 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

Timeline

Published
September 25, 2020
Last Modified
November 21, 2024
First Seen
September 25, 2020

Related Vulnerabilities