CVE-2021-41200: TensorFlow: DoS crash in tf.summary file writer

MEDIUMPoC AVAILABLE
Published November 5, 2021
CISO Take

A local attacker or malicious insider with low privileges can crash any TensorFlow process by passing non-scalar arguments to tf.summary.create_file_writer, disrupting training jobs and MLOps pipelines. Patch to TensorFlow 2.7.0 (or backports 2.6.1 / 2.5.2 / 2.4.4) immediately if TensorBoard logging is exposed to untrusted input. Risk is limited to availability — no data exfiltration or code execution path exists.

What is the risk?

Moderate operational risk for organizations running TensorFlow training pipelines at scale. CVSS 5.5 (local, low-privilege) understates real-world impact in shared GPU cluster environments where a single tenant crash can abort multi-hour or multi-day training runs costing thousands in compute. Not exploitable remotely and not in CISA KEV, but insider threat and compromised CI/CD pipeline scenarios are realistic vectors in ML-heavy organizations.

What systems are affected?

PackageEcosystemVulnerable RangePatched
TensorFlowpip—No patch
201.3KOpenSSF 7.63.4K dependentsPushed 5d ago4% patched~1372d to patchFull package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
5.5 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 15% 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?

AVACPRUISCIA
AVLocal
ACLow
PRLow
UINone
SUnchanged
CNone
INone
AHigh

What should I do?

4 steps
  1. Patch: Upgrade to TensorFlow 2.7.0+, or apply cherrypick backports for 2.6.1, 2.5.2, and 2.4.4.

  2. Workaround: Add input validation to enforce scalar tensors before passing to tf.summary.create_file_writer in any code path accepting external input.

  3. Detection: Monitor training job logs for unexpected CHECK-fail crashes and abnormal job terminations in TF training workloads.

  4. Isolation: Run untrusted training jobs in isolated environments (containers/VMs) to limit blast radius of intentional DoS.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

ISO 42001
A.6.2.5-AI system availability and resilience
NIST AI RMF
GOVERN 1.7-Processes and procedures are in place for decommissioning and phase-out of AI systemsMANAGE 2.2-Mechanisms are in place to sustain risk management activities
OWASP LLM Top 10
LLM04-Model Denial of Service

Frequently Asked Questions

What is CVE-2021-41200?

A local attacker or malicious insider with low privileges can crash any TensorFlow process by passing non-scalar arguments to tf.summary.create_file_writer, disrupting training jobs and MLOps pipelines. Patch to TensorFlow 2.7.0 (or backports 2.6.1 / 2.5.2 / 2.4.4) immediately if TensorBoard logging is exposed to untrusted input. Risk is limited to availability — no data exfiltration or code execution path exists.

Is CVE-2021-41200 actively exploited?

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

How to fix CVE-2021-41200?

1. Patch: Upgrade to TensorFlow 2.7.0+, or apply cherrypick backports for 2.6.1, 2.5.2, and 2.4.4. 2. Workaround: Add input validation to enforce scalar tensors before passing to tf.summary.create_file_writer in any code path accepting external input. 3. Detection: Monitor training job logs for unexpected CHECK-fail crashes and abnormal job terminations in TF training workloads. 4. Isolation: Run untrusted training jobs in isolated environments (containers/VMs) to limit blast radius of intentional DoS.

What systems are affected by CVE-2021-41200?

This vulnerability affects the following AI/ML architecture patterns: training pipelines, model development environments, MLOps platforms.

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

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

What is the AI security impact?

Affected AI Architectures

training pipelinesmodel development environmentsMLOps platforms

MITRE ATLAS Techniques

AML.T0010.001AI Software
AML.T0029Denial of AI Service
AML.T0034Cost Harvesting

Compliance Controls Affected

ISO 42001: A.6.2.5
NIST AI RMF: GOVERN 1.7, MANAGE 2.2
OWASP LLM Top 10: LLM04

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. In affected versions if `tf.summary.create_file_writer` is called with non-scalar arguments code crashes due to a `CHECK`-fail. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.

Exploitation Scenario

A malicious insider or attacker with access to a shared ML training platform (e.g., via a compromised ML engineer account or rogue training script submitted to a job queue) submits a training job that calls tf.summary.create_file_writer with a deliberately crafted non-scalar tensor. The resulting CHECK-fail terminates the TensorFlow process, aborting co-resident training jobs on the same worker node. On long-running foundation model training runs, this translates to significant compute waste and potential checkpoint loss. An adversary could repeat this to continually disrupt model development cycles.

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] If the assertion statement is required (e.g., for security or reliability), change the invoking code to avoid the conditions that trigger the assertion.
  • [Implementation] Consider changing the assertion to some other less "fatal" error. This might not be easy to implement, since other code may be needed to handle the error.

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

Timeline

Published
November 5, 2021
Last Modified
November 21, 2024
First Seen
November 5, 2021

Related Vulnerabilities