CVE-2021-29618: TensorFlow: DoS crash via tf.transpose complex+conjugate

MEDIUM PoC AVAILABLE
Published May 14, 2021
CISO Take

This is a local denial-of-service vulnerability in TensorFlow that crashes the process when tf.transpose receives a complex tensor alongside conjugate=True. No data exfiltration or code execution is possible, but in shared ML environments (JupyterHub, MLflow, multi-tenant training clusters), a low-privileged user can intentionally crash workloads. Patch to TF 2.5.0, 2.4.2, 2.3.3, 2.2.3, or 2.1.4 immediately if running affected versions in shared or production environments.

Risk Assessment

Medium risk overall, but context-dependent. Exploitation is trivial—any authenticated local user can crash a TensorFlow process with a single API call. The blast radius is limited to availability: no confidentiality or integrity impact. Risk escalates significantly in multi-tenant ML platforms where process crashes can disrupt co-running training jobs, corrupt checkpoint state, or degrade model serving SLAs. Not exploitable remotely without an adjacent code execution primitive.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
5.5 / 10
EPSS
0.0%
chance of exploitation in 30 days
Higher than 6% 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, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Local
AC Low
PR Low
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  1. Upgrade TensorFlow to 2.5.0 or apply the backport patches: 2.4.2, 2.3.3, 2.2.3, 2.1.4.

  2. If immediate patching is not possible, add an input validation layer to reject or flag requests combining complex dtype tensors with conjugate=True before they reach tf.transpose.

  3. In multi-tenant environments, isolate TensorFlow workers per user to contain blast radius.

  4. Monitor for unexpected TensorFlow process restarts or OOM/crash signals in serving infrastructure logs as a detection signal.

  5. Pin TF versions in Docker images and CI pipelines to patched builds.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.7 - AI system availability and resilience
NIST AI RMF
MANAGE-2.4 - Residual risks from AI systems are managed
OWASP LLM Top 10
LLM10 - Model Denial of Service

Frequently Asked Questions

What is CVE-2021-29618?

This is a local denial-of-service vulnerability in TensorFlow that crashes the process when tf.transpose receives a complex tensor alongside conjugate=True. No data exfiltration or code execution is possible, but in shared ML environments (JupyterHub, MLflow, multi-tenant training clusters), a low-privileged user can intentionally crash workloads. Patch to TF 2.5.0, 2.4.2, 2.3.3, 2.2.3, or 2.1.4 immediately if running affected versions in shared or production environments.

Is CVE-2021-29618 actively exploited?

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

How to fix CVE-2021-29618?

1. Upgrade TensorFlow to 2.5.0 or apply the backport patches: 2.4.2, 2.3.3, 2.2.3, 2.1.4. 2. If immediate patching is not possible, add an input validation layer to reject or flag requests combining complex dtype tensors with conjugate=True before they reach tf.transpose. 3. In multi-tenant environments, isolate TensorFlow workers per user to contain blast radius. 4. Monitor for unexpected TensorFlow process restarts or OOM/crash signals in serving infrastructure logs as a detection signal. 5. Pin TF versions in Docker images and CI pipelines to patched builds.

What systems are affected by CVE-2021-29618?

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

What is the CVSS score for CVE-2021-29618?

CVE-2021-29618 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.02%.

Technical Details

NVD Description

TensorFlow is an end-to-end open source platform for machine learning. Passing a complex argument to `tf.transpose` at the same time as passing `conjugate=True` argument results in a crash. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

Exploitation Scenario

An attacker with local access to a shared ML platform (e.g., a data scientist account on a JupyterHub cluster or a rogue notebook job on SageMaker) submits a minimal script: `import tensorflow as tf; import numpy as np; x = tf.constant(np.array([1+2j]), dtype=tf.complex64); tf.transpose(x, conjugate=True)`. This immediately crashes the TensorFlow kernel or worker process. On a shared inference server, an adversary with API access to a model endpoint that internally calls tf.transpose on complex inputs could trigger repeated crashes to degrade availability—effectively a low-cost DoS against ML infrastructure without any exploit sophistication.

Weaknesses (CWE)

CVSS Vector

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

Timeline

Published
May 14, 2021
Last Modified
November 21, 2024
First Seen
May 14, 2021

Related Vulnerabilities