CVE-2022-41898: TensorFlow: DoS crash via empty SparseFillEmptyRowsGrad inputs

HIGH PoC AVAILABLE CISA: TRACK*
Published November 18, 2022
CISO Take

A network-reachable denial-of-service in TensorFlow allows any unauthenticated attacker to crash inference or training services by submitting empty sparse tensor inputs. If you expose TensorFlow Serving endpoints or accept user-controlled tensor inputs, patch immediately to TF 2.11, 2.10.1, 2.9.3, or 2.8.4. No workaround beyond input sanitization at the application layer—upgrade is the only reliable fix.

Risk Assessment

High. CVSS 7.5 reflects the trivial exploitability: network-accessible, no authentication, no user interaction required. Impact is purely availability (complete process crash), which translates to full service outage for ML inference endpoints. EPSS data unavailable but the attack surface is broad—any TF deployment accepting external sparse tensor data is exposed. Not in CISA KEV and no known active exploitation, which tempers urgency slightly, but the low barrier to exploitation means opportunistic attacks are realistic.

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
7.5 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 39% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
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 Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

1 step
  1. 1) PATCH: Upgrade to TensorFlow 2.11.0, 2.10.1, 2.9.3, or 2.8.4—all contain the fix (commit af4a6a3). 2) VALIDATE INPUTS: Add pre-processing validation to reject empty sparse tensors before they reach SparseFillEmptyRowsGrad; check that empty_row_indicator and related tensors are non-empty at application boundaries. 3) ISOLATE: Run TF Serving instances in containers with restart policies so crashes auto-recover and don't cascade. 4) MONITOR: Alert on unexpected TF process exits or serving health check failures—these may indicate active exploitation attempts. 5) NETWORK CONTROLS: If TF Serving is not required to be public-facing, restrict access to internal networks or authenticated clients only.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art.15 - Accuracy, Robustness and Cybersecurity
ISO 42001
A.9.3 - AI System Availability and Resilience
NIST AI RMF
MANAGE-2.2 - Mechanisms to sustain AI system function and trustworthiness
OWASP LLM Top 10
LLM10 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-41898?

A network-reachable denial-of-service in TensorFlow allows any unauthenticated attacker to crash inference or training services by submitting empty sparse tensor inputs. If you expose TensorFlow Serving endpoints or accept user-controlled tensor inputs, patch immediately to TF 2.11, 2.10.1, 2.9.3, or 2.8.4. No workaround beyond input sanitization at the application layer—upgrade is the only reliable fix.

Is CVE-2022-41898 actively exploited?

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

How to fix CVE-2022-41898?

1) PATCH: Upgrade to TensorFlow 2.11.0, 2.10.1, 2.9.3, or 2.8.4—all contain the fix (commit af4a6a3). 2) VALIDATE INPUTS: Add pre-processing validation to reject empty sparse tensors before they reach SparseFillEmptyRowsGrad; check that `empty_row_indicator` and related tensors are non-empty at application boundaries. 3) ISOLATE: Run TF Serving instances in containers with restart policies so crashes auto-recover and don't cascade. 4) MONITOR: Alert on unexpected TF process exits or serving health check failures—these may indicate active exploitation attempts. 5) NETWORK CONTROLS: If TF Serving is not required to be public-facing, restrict access to internal networks or authenticated clients only.

What systems are affected by CVE-2022-41898?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference APIs, recommendation systems.

What is the CVSS score for CVE-2022-41898?

CVE-2022-41898 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.18%.

Technical Details

NVD Description

TensorFlow is an open source platform for machine learning. If `SparseFillEmptyRowsGrad` is given empty inputs, TensorFlow will crash. We have patched the issue in GitHub commit af4a6a3c8b95022c351edae94560acc61253a1b8. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.

Exploitation Scenario

An adversary identifies a public-facing model inference API (e.g., TensorFlow Serving REST endpoint) through active scanning or public documentation. They craft a POST request containing a sparse tensor payload with empty `SparseFillEmptyRowsGrad` inputs—a trivial manipulation requiring no ML expertise, just knowledge of TF's sparse tensor API format. Upon submission, the TF serving process crashes immediately. The attacker repeats this in a loop to maintain a persistent denial-of-service condition, preventing legitimate users from accessing the model. In a SaaS context, this translates to platform-wide outage until the service is restarted and patched.

Weaknesses (CWE)

CVSS Vector

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

Timeline

Published
November 18, 2022
Last Modified
November 21, 2024
First Seen
November 18, 2022

Related Vulnerabilities