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.

Risk Assessment

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.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 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.1%
chance of exploitation in 30 days
Higher than 22% 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 Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

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.

CISA SSVC Assessment

Decision Track
Exploitation none
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
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.07%.

Technical Details

NVD Description

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)

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