CVE-2021-29562: TensorFlow: assertion failure DoS in IRFFT op

MEDIUM PoC AVAILABLE
Published May 14, 2021
CISO Take

A local attacker with low privileges can crash TensorFlow processes by triggering a CHECK assertion failure in tf.raw_ops.IRFFT with malformed inputs. Risk is concentrated in shared ML platforms (JupyterHub, Kubeflow) where multiple users share compute resources. Patch to TF 2.5.0, 2.4.2, 2.3.3, 2.2.3, or 2.1.4 during next maintenance window — not an emergency but should not remain unpatched.

Risk Assessment

CVSS 5.5 (Medium) with local attack vector limits internet-facing exposure significantly. In shared ML infrastructure — common in enterprise data science teams — this is exploitable by any authenticated local user with minimal TF knowledge. Impact is availability-only (A:H) with zero confidentiality or integrity risk. Priority is moderate: schedule patching but not emergency response unless operating a multi-tenant ML platform with untrusted users.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed today 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 1% 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

4 steps
  1. Patch: Upgrade to TensorFlow 2.5.0, 2.4.2, 2.3.3, 2.2.3, or 2.1.4. Apply commit 1c56f53be0b722ca657cbc7df461ed676c8642a2 as a hotfix if immediate upgrade is not feasible.

  2. Validate inputs: Add dtype and shape validation before any IRFFT operation call in production code.

  3. Restrict graph submission: In shared environments, limit which users can submit custom computation graphs.

  4. Detect: Monitor for TF process crashes and CHECK assertion failure log entries; alert on repeated failures from the same user or session.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 9 - Risk management system
ISO 42001
A.6.2.4 - AI System Operation
NIST AI RMF
MANAGE-2.2 - Mechanisms to sustain the value of deployed AI systems
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2021-29562?

A local attacker with low privileges can crash TensorFlow processes by triggering a CHECK assertion failure in tf.raw_ops.IRFFT with malformed inputs. Risk is concentrated in shared ML platforms (JupyterHub, Kubeflow) where multiple users share compute resources. Patch to TF 2.5.0, 2.4.2, 2.3.3, 2.2.3, or 2.1.4 during next maintenance window — not an emergency but should not remain unpatched.

Is CVE-2021-29562 actively exploited?

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

How to fix CVE-2021-29562?

1. Patch: Upgrade to TensorFlow 2.5.0, 2.4.2, 2.3.3, 2.2.3, or 2.1.4. Apply commit 1c56f53be0b722ca657cbc7df461ed676c8642a2 as a hotfix if immediate upgrade is not feasible. 2. Validate inputs: Add dtype and shape validation before any IRFFT operation call in production code. 3. Restrict graph submission: In shared environments, limit which users can submit custom computation graphs. 4. Detect: Monitor for TF process crashes and CHECK assertion failure log entries; alert on repeated failures from the same user or session.

What systems are affected by CVE-2021-29562?

This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, audio/signal processing ML pipelines, shared notebook environments.

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

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

Technical Details

NVD Description

TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a denial of service by exploiting a `CHECK`-failure coming from the implementation of `tf.raw_ops.IRFFT`. 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 JupyterHub or Kubeflow environment writes a Python snippet calling tf.raw_ops.IRFFT with an invalid tensor — wrong dtype or mismatched shape triggers the internal CHECK assertion. This causes an unhandled exception crashing the TensorFlow runtime process. On a shared notebook server, this interrupts other users' long-running training jobs. The attack requires only basic TensorFlow knowledge: identifying the vulnerable op and supplying a malformed input.

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