CVE-2022-35988: TensorFlow: GPU DoS via empty input to matrix_rank op

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow deployment exposing GPU-backed `matrix_rank` operations to external or untrusted inputs is vulnerable to a crash-loop DoS with a single malformed request. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workaround exists per the vendor advisory. If running TF Serving behind an API gateway, add tensor shape validation at the ingress layer as a compensating control while patching.

What is the risk?

High severity (CVSS 7.5) with a favorable attacker profile: network-reachable, zero privileges, zero user interaction, low complexity. The CHECK-fail pattern in TensorFlow GPU kernels is a well-understood class of vulnerabilities with multiple prior instances in the same release cycle, making exploitation trivial for anyone familiar with TF's input validation gaps. Risk is highest for organizations running TF Serving or similar inference APIs with GPU backends exposed to untrusted callers; isolated training environments have substantially lower exposure.

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 30% 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?

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?

5 steps
  1. Patch: upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit c55b476aa0e0bd4ee99d0f3ad18d9d706cd1260a).

  2. No vendor-acknowledged workaround exists; patching is the only fix.

  3. Compensating control: validate that input tensors to any linear algebra API call are non-empty before forwarding to the model — reject requests with zero-dimension tensors at the API gateway or application layer.

  4. Detection: monitor TensorFlow server logs for Check failed or CHECK assertion messages; repeated occurrences from a single source IP indicate active exploitation.

  5. If GPU compute is critical and patching is delayed, consider routing matrix_rank operations to CPU-only kernels as an emergency measure.

What does CISA's SSVC say?

Decision Track
Exploitation none
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.2.6 - AI System Robustness and Availability
NIST AI RMF
MANAGE 2.2 - Residual risks are managed
OWASP LLM Top 10
LLM10:2025 - Unbounded Consumption

Frequently Asked Questions

What is CVE-2022-35988?

Any TensorFlow deployment exposing GPU-backed `matrix_rank` operations to external or untrusted inputs is vulnerable to a crash-loop DoS with a single malformed request. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workaround exists per the vendor advisory. If running TF Serving behind an API gateway, add tensor shape validation at the ingress layer as a compensating control while patching.

Is CVE-2022-35988 actively exploited?

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

How to fix CVE-2022-35988?

1. Patch: upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit c55b476aa0e0bd4ee99d0f3ad18d9d706cd1260a). 2. No vendor-acknowledged workaround exists; patching is the only fix. 3. Compensating control: validate that input tensors to any linear algebra API call are non-empty before forwarding to the model — reject requests with zero-dimension tensors at the API gateway or application layer. 4. Detection: monitor TensorFlow server logs for `Check failed` or `CHECK` assertion messages; repeated occurrences from a single source IP indicate active exploitation. 5. If GPU compute is critical and patching is delayed, consider routing `matrix_rank` operations to CPU-only kernels as an emergency measure.

What systems are affected by CVE-2022-35988?

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

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

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

What is the AI security impact?

Affected AI Architectures

model servinginference APIstraining pipelines

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.2.6
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM10:2025

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. When `tf.linalg.matrix_rank` receives an empty input `a`, the GPU kernel gives a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit c55b476aa0e0bd4ee99d0f3ad18d9d706cd1260a. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.

Exploitation Scenario

An adversary targeting a TF Serving endpoint hosting a recommender or embedding model sends a POST request to the prediction API with a deliberately empty tensor payload (shape [0, 0] or similar) as input to any model pipeline that internally calls `tf.linalg.matrix_rank`. The GPU kernel raises an unhandled CHECK assertion, crashing the serving process. In a containerized deployment without automatic restart, this takes the service offline; with restart policies, the attacker can loop requests to maintain a persistent denial of service at negligible cost. No authentication token or ML knowledge is required — the attack requires only knowledge that the endpoint uses TensorFlow and accepts matrix-shaped inputs.

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] Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources)
  • [Implementation] Perform input validation on user data.

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
September 16, 2022
Last Modified
November 21, 2024
First Seen
September 16, 2022

Related Vulnerabilities