CVE-2021-29617: TensorFlow: DoS via CHECK-fail in strings.substr

GHSA-mmq6-q8r3-48fm MEDIUM PoC AVAILABLE
Published May 14, 2021
CISO Take

A local attacker with low-privilege access can crash TensorFlow processes by passing invalid arguments to tf.strings.substr, triggering a CHECK-fail denial of service. The local-only attack vector significantly limits blast radius — remote exploitation requires a separate vulnerability to achieve local access first. Patch to TensorFlow 2.1.4+, 2.2.3+, 2.3.3+, 2.4.2+, or 2.5.0+ to remediate.

Risk Assessment

Low-to-medium operational risk. CVSS 5.5 with a local attack vector and low privileges keeps real-world exploitation unlikely (EPSS: 0.0005, not in CISA KEV). Impact is availability-only — no data exfiltration or integrity compromise. Risk elevates in multi-tenant ML environments (shared GPU clusters, hosted Jupyter notebooks) where local access is more easily achievable by 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 →
tensorflow pip < 2.1.4 2.1.4
195.0K OpenSSF 7.2 3.7K dependents Pushed today 4% patched ~1372d to patch Full package profile →
tensorflow-cpu pip < 2.1.4 2.1.4
195.0K OpenSSF 7.2 3.7K dependents Pushed today 4% patched ~1372d to patch Full package profile →
tensorflow-gpu pip < 2.1.4 2.1.4
195.0K OpenSSF 7.2 3.7K dependents Pushed today 4% patched ~1372d to patch Full package profile →

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

4 steps
  1. Upgrade to TensorFlow ≥2.1.4, ≥2.2.3, ≥2.3.3, ≥2.4.2, or ≥2.5.0 depending on the branch in use.

  2. If immediate patching is blocked, validate and sanitize arguments passed to tf.strings.substr before invocation — specifically enforce valid position and length bounds.

  3. Restrict local system access to TensorFlow processes via OS-level controls and least-privilege principles.

  4. Monitor for abnormal TensorFlow process crashes as a potential indicator of exploitation attempts in shared environments.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
6.1.2 - AI Risk Assessment — Availability
NIST AI RMF
MANAGE-2.2 - Treatment of Identified AI Risks

Frequently Asked Questions

What is CVE-2021-29617?

A local attacker with low-privilege access can crash TensorFlow processes by passing invalid arguments to tf.strings.substr, triggering a CHECK-fail denial of service. The local-only attack vector significantly limits blast radius — remote exploitation requires a separate vulnerability to achieve local access first. Patch to TensorFlow 2.1.4+, 2.2.3+, 2.3.3+, 2.4.2+, or 2.5.0+ to remediate.

Is CVE-2021-29617 actively exploited?

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

How to fix CVE-2021-29617?

1. Upgrade to TensorFlow ≥2.1.4, ≥2.2.3, ≥2.3.3, ≥2.4.2, or ≥2.5.0 depending on the branch in use. 2. If immediate patching is blocked, validate and sanitize arguments passed to tf.strings.substr before invocation — specifically enforce valid position and length bounds. 3. Restrict local system access to TensorFlow processes via OS-level controls and least-privilege principles. 4. Monitor for abnormal TensorFlow process crashes as a potential indicator of exploitation attempts in shared environments.

What systems are affected by CVE-2021-29617?

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

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

CVE-2021-29617 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. An attacker can cause a denial of service via `CHECK`-fail in `tf.strings.substr` with invalid arguments. 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 adversary with low-privilege local access to a shared ML training server crafts a Python script calling tf.strings.substr with invalid arguments (e.g., out-of-bounds position or negative length). The internal CHECK assertion fails, immediately crashing the TensorFlow process. In a shared Jupyter notebook environment or multi-tenant ML platform, this disrupts concurrent training jobs and inference services belonging to other users — potentially causing costly training restarts or SLA violations without any permanent damage to data or models.

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