CVE-2022-29198: TensorFlow: DoS via sparse tensor input validation failure

MEDIUM PoC AVAILABLE CISA: TRACK*
Published May 20, 2022
CISO Take

This medium-severity DoS in TensorFlow crashes the runtime via malformed sparse tensor inputs—no RCE, no data leakage. Risk is real in shared ML environments (Jupyter clusters, multi-tenant GPU nodes) where low-privileged users can submit crafted inputs. Patch to TF 2.9.0/2.8.1/2.7.2/2.6.4 at next maintenance window; no emergency action required.

What is the risk?

CVSS 5.5 Medium with local attack vector and low privilege requirement limits blast radius. Exploitation requires access to the TF runtime, which in practice means shared notebooks, Kubeflow pipelines, or on-prem GPU clusters with multi-user access. No evidence of active exploitation and not in CISA KEV. Severity elevates in high-availability inference environments where process crashes affect SLAs, but remains low-priority compared to RCE or data exposure vectors.

What systems are affected?

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

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
5.5 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 23% 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 Local
AC Low
PR Low
UI None
S Unchanged
C None
I None
A High

What should I do?

5 steps
  1. Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4.

  2. If immediate patching is not possible, validate that dense_shape is rank-1 and indices is rank-2 before calling SparseTensorToCSRSparseMatrix at the application layer.

  3. In shared environments, restrict which users can submit raw ops to the TF runtime.

  4. For inference services, add input shape validation at the API gateway before tensors reach TF.

  5. Monitor for unexpected TF process crashes—repeated CHECK-failure crashes with user-controlled inputs indicate active exploitation attempts.

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
Article 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
A.6.1.4 - AI System Availability and Resilience
NIST AI RMF
MANAGE-2.2 - Risk Response: Availability and Resilience
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-29198?

This medium-severity DoS in TensorFlow crashes the runtime via malformed sparse tensor inputs—no RCE, no data leakage. Risk is real in shared ML environments (Jupyter clusters, multi-tenant GPU nodes) where low-privileged users can submit crafted inputs. Patch to TF 2.9.0/2.8.1/2.7.2/2.6.4 at next maintenance window; no emergency action required.

Is CVE-2022-29198 actively exploited?

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

How to fix CVE-2022-29198?

1. Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4. 2. If immediate patching is not possible, validate that dense_shape is rank-1 and indices is rank-2 before calling SparseTensorToCSRSparseMatrix at the application layer. 3. In shared environments, restrict which users can submit raw ops to the TF runtime. 4. For inference services, add input shape validation at the API gateway before tensors reach TF. 5. Monitor for unexpected TF process crashes—repeated CHECK-failure crashes with user-controlled inputs indicate active exploitation attempts.

What systems are affected by CVE-2022-29198?

This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, inference, shared ML platforms.

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

CVE-2022-29198 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.32%.

What is the AI security impact?

Affected AI Architectures

training pipelinesmodel servinginferenceshared ML platforms

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0034 Cost Harvesting
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.1.4
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM04

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.SparseTensorToCSRSparseMatrix` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `dense_shape` is a vector and `indices` is a matrix (as part of requirements for sparse tensors) but there is no validation for this. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

Exploitation Scenario

An attacker with access to a shared Jupyter Hub instance or Kubeflow pipeline crafts a SparseTensor where dense_shape is a matrix instead of a vector, or indices is a vector instead of a matrix. Passing this to tf.raw_ops.SparseTensorToCSRSparseMatrix triggers an unchecked assertion failure, crashing the TF process. In a multi-tenant ML platform, this disrupts other users' training jobs sharing the same runtime. In an inference API exposing sparse tensor endpoints, repeated calls constitute a targeted availability attack without rate limiting.

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:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
May 20, 2022
Last Modified
November 21, 2024
First Seen
May 20, 2022

Related Vulnerabilities