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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 3d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 35% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

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

How is it classified?

Which compliance frameworks are affected?

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.44%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference APIsrecommendation systems

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0043 Craft Adversarial Data
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art.15
ISO 42001: A.9.3
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM10

What are the technical details?

Original Advisory

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)

CWE-20 — Improper Input Validation: The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

  • [Architecture and Design] Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build "recognizers" for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111]
  • [Architecture and Design] Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).

Source: MITRE CWE corpus.

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