CVE-2020-15193: TensorFlow: uninitialized memory corruption via dlpack

HIGH PoC AVAILABLE
Published September 25, 2020
CISO Take

A low-privileged remote attacker can corrupt TensorFlow process memory by passing a malformed Python object to the DLPack interface, achieving high integrity impact. Patch to TensorFlow 2.2.1 or 2.3.1 immediately—all prior 2.x versions are affected. Prioritize any deployment where untrusted users can submit inference requests or execute TF code remotely.

What is the risk?

CVSS 7.1 (High) with network-accessible attack vector, low complexity, and low privilege requirement makes this exploitable in most multi-tenant ML serving environments. Integrity impact is HIGH while confidentiality is unaffected, indicating the primary risk is memory/model output corruption rather than data exfiltration. The trivially low attack complexity—simply passing the wrong Python type—means exploitation requires no adversarial AI expertise. Not in CISA KEV but relevant to any organization running unpatched TF inference infrastructure exposed to low-trust users.

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
7.1 / 10
EPSS
0.7%
chance of exploitation in 30 days
Higher than 48% 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 Low
UI None
S Unchanged
C None
I High
A Low

What should I do?

6 steps
  1. Patch immediately: upgrade to TensorFlow 2.2.1 or 2.3.1 (patch commit 22e07fb204386768e5bcbea563641ea11f96ceb8).

  2. Inventory all TF deployments and identify any using dlpack.to_dlpack() directly or via dependent libraries.

  3. If immediate patching is blocked, restrict execution of DLPack-related functions to fully trusted, authenticated users only.

  4. In serving environments, enforce strict input type validation before passing data to DLPack interfaces.

  5. Monitor TF inference services for unexpected crashes, memory errors, or process instability as potential exploitation indicators.

  6. Review OpenSUSE Leap deployments specifically, as a separate advisory was issued for that platform.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art. 9 - Risk Management System
ISO 42001
A.9.3 - AI System Security
NIST AI RMF
MANAGE 2.2 - Mechanisms are in place to address AI risks
OWASP LLM Top 10
LLM05:2025 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2020-15193?

A low-privileged remote attacker can corrupt TensorFlow process memory by passing a malformed Python object to the DLPack interface, achieving high integrity impact. Patch to TensorFlow 2.2.1 or 2.3.1 immediately—all prior 2.x versions are affected. Prioritize any deployment where untrusted users can submit inference requests or execute TF code remotely.

Is CVE-2020-15193 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2020-15193, increasing the risk of exploitation.

How to fix CVE-2020-15193?

1. Patch immediately: upgrade to TensorFlow 2.2.1 or 2.3.1 (patch commit 22e07fb204386768e5bcbea563641ea11f96ceb8). 2. Inventory all TF deployments and identify any using dlpack.to_dlpack() directly or via dependent libraries. 3. If immediate patching is blocked, restrict execution of DLPack-related functions to fully trusted, authenticated users only. 4. In serving environments, enforce strict input type validation before passing data to DLPack interfaces. 5. Monitor TF inference services for unexpected crashes, memory errors, or process instability as potential exploitation indicators. 6. Review OpenSUSE Leap deployments specifically, as a separate advisory was issued for that platform.

What systems are affected by CVE-2020-15193?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference.

What is the CVSS score for CVE-2020-15193?

CVE-2020-15193 has a CVSS v3.1 base score of 7.1 (HIGH). The EPSS exploitation probability is 0.68%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0040 AI Model Inference API Access
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art. 9
ISO 42001: A.9.3
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM05:2025

What are the technical details?

Original Advisory

In Tensorflow before versions 2.2.1 and 2.3.1, the implementation of `dlpack.to_dlpack` can be made to use uninitialized memory resulting in further memory corruption. This is because the pybind11 glue code assumes that the argument is a tensor. However, there is nothing stopping users from passing in a Python object instead of a tensor. The uninitialized memory address is due to a `reinterpret_cast` Since the `PyObject` is a Python object, not a TensorFlow Tensor, the cast to `EagerTensor` fails. The issue is patched in commit 22e07fb204386768e5bcbea563641ea11f96ceb8 and is released in TensorFlow versions 2.2.1, or 2.3.1.

Exploitation Scenario

An attacker with low-privilege access to a shared TensorFlow serving endpoint or multi-tenant ML notebook environment crafts a request that passes a standard Python object (a dict, list, or arbitrary class instance) directly to dlpack.to_dlpack() instead of a proper TF tensor. The pybind11 binding performs an unchecked reinterpret_cast from PyObject to EagerTensor, dereferencing uninitialized memory at an arbitrary address. This corrupts process memory, enabling the attacker to destabilize the inference service, corrupt in-flight model outputs for other users, or crash the TF runtime entirely—all achieved with basic Python knowledge and only low-privilege API access.

Weaknesses (CWE)

CWE-908 — Use of Uninitialized Resource: The product uses or accesses a resource that has not been initialized.

  • [Implementation] Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all required steps.
  • [Implementation] Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Timeline

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

Related Vulnerabilities