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.

What is the risk?

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.

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

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

What is the AI security impact?

Affected AI Architectures

model servinginference endpointstraining pipelinesnotebook environments

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

What are the technical details?

Original Advisory

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)

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