CVE-2022-35998: TensorFlow: DoS via EmptyTensorList CHECK fail

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow inference service exposing ops that accept user-controlled tensor shapes is vulnerable to unauthenticated remote crash — no credentials needed, low complexity. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; there are no workarounds. Audit your model serving endpoints for exposed TF runtime access, particularly in shared inference platforms.

Risk Assessment

High severity (CVSS 7.5) with network-accessible, zero-auth, low-complexity exploitation. The CHECK fail causes process termination, which in production model-serving contexts means full availability loss. Risk is elevated in multi-tenant inference platforms where adversaries can craft inference payloads. Not in CISA KEV and no confirmed exploitation in the wild, but the attack surface is broad — any TF serving deployment on supported versions 2.7.x–2.9.x is exposed.

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.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 immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (cherry-picked fix per advisory).

  2. No official workaround exists — patching is the only remediation.

  3. As defense-in-depth: validate and reject multi-dimensional element_shape inputs at API gateway or input preprocessing layers before they reach TF runtime.

  4. Deploy model serving behind authentication even for 'internal' endpoints to limit the unauthenticated attack surface.

  5. Monitor for abnormal process restarts or crash loops in TF Serving containers as a detection signal.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.3 - AI system robustness and availability
NIST AI RMF
MANAGE-2.2 - Mechanisms for AI risk response and recovery
OWASP LLM Top 10
LLM05:2025 - Insecure Plugin and Supply Chain

Frequently Asked Questions

What is CVE-2022-35998?

Any TensorFlow inference service exposing ops that accept user-controlled tensor shapes is vulnerable to unauthenticated remote crash — no credentials needed, low complexity. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; there are no workarounds. Audit your model serving endpoints for exposed TF runtime access, particularly in shared inference platforms.

Is CVE-2022-35998 actively exploited?

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

How to fix CVE-2022-35998?

1. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (cherry-picked fix per advisory). 2. No official workaround exists — patching is the only remediation. 3. As defense-in-depth: validate and reject multi-dimensional element_shape inputs at API gateway or input preprocessing layers before they reach TF runtime. 4. Deploy model serving behind authentication even for 'internal' endpoints to limit the unauthenticated attack surface. 5. Monitor for abnormal process restarts or crash loops in TF Serving containers as a detection signal.

What systems are affected by CVE-2022-35998?

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

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

CVE-2022-35998 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. If `EmptyTensorList` receives an input `element_shape` with more than one dimension, it gives a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit c8ba76d48567aed347508e0552a257641931024d. 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 identifies a publicly accessible TensorFlow Serving endpoint or ML inference API. They craft a request that triggers the EmptyTensorList operation with a multi-dimensional element_shape tensor (e.g., shape [2,2] instead of scalar or 1D). The TF runtime hits an internal CHECK assertion, aborts the process, and the inference service crashes. In containerized deployments without auto-restart, this results in extended downtime. In auto-restarting environments, the attacker can loop requests to maintain continuous denial of service. No ML knowledge is required — the attacker only needs to know the endpoint accepts TF-compatible 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