CVE-2021-29562: TensorFlow: assertion failure DoS in IRFFT op
MEDIUM PoC AVAILABLEA 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.
What is the risk?
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.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
4 steps-
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.
-
Validate inputs: Add dtype and shape validation before any IRFFT operation call in production code.
-
Restrict graph submission: In shared environments, limit which users can submit custom computation graphs.
-
Detect: Monitor for TF process crashes and CHECK assertion failure log entries; alert on repeated failures from the same user or session.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
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.19%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service Compliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-617 — Reachable Assertion: The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
- [Implementation] Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources)
- [Implementation] Perform input validation on user data.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/commit/1c56f53be0b722ca657cbc7df461ed676c8642a2 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-36vm-xw34-x4pj Exploit Patch 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