CVE-2022-35991: TensorFlow: DoS via TensorListScatter CHECK fail

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow deployment exposing inference endpoints to untrusted network inputs is vulnerable to process crash via a single malformed tensor shape. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workarounds exist. Priority is high for externally-facing ML serving infrastructure; internal-only deployments carry lower but non-zero risk.

What is the risk?

CVSS 7.5 High with AV:N/AC:L/PR:N/UI:N makes this trivially exploitable from the network with no authentication. Impact is limited to availability (A:H), with no confidentiality or integrity compromise. The attack requires only a single malformed request, making automated exploitation or enumeration-based DoS campaigns realistic. Risk is elevated for organizations running TensorFlow Serving or custom inference APIs exposed to the internet or multi-tenant environments.

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 34% 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 — apply the commit bb03fdf4aae944ab2e4b35c7daa051068a8b7f61.

  2. Input validation: Add shape validation middleware that rejects element_shape tensors with rank > 1 before they reach TF ops.

  3. Process isolation: Run TF Serving workers in isolated containers/processes with automatic restart (e.g., Kubernetes restartPolicy) to limit blast radius.

  4. Network controls: Restrict direct tensor input endpoints to authenticated, authorized callers only.

  5. Detection: Monitor for abrupt process exits or elevated restart rates on inference workers as an indicator of exploitation attempts.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 9 - Risk management system
ISO 42001
8.4 - AI system operation
NIST AI RMF
GOVERN 1.7 - Processes and procedures are in place for decommissioning and phase-out MANAGE 2.4 - Residual risks are managed

Frequently Asked Questions

What is CVE-2022-35991?

Any TensorFlow deployment exposing inference endpoints to untrusted network inputs is vulnerable to process crash via a single malformed tensor shape. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workarounds exist. Priority is high for externally-facing ML serving infrastructure; internal-only deployments carry lower but non-zero risk.

Is CVE-2022-35991 actively exploited?

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

How to fix CVE-2022-35991?

1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — apply the commit bb03fdf4aae944ab2e4b35c7daa051068a8b7f61. 2. Input validation: Add shape validation middleware that rejects element_shape tensors with rank > 1 before they reach TF ops. 3. Process isolation: Run TF Serving workers in isolated containers/processes with automatic restart (e.g., Kubernetes restartPolicy) to limit blast radius. 4. Network controls: Restrict direct tensor input endpoints to authenticated, authorized callers only. 5. Detection: Monitor for abrupt process exits or elevated restart rates on inference workers as an indicator of exploitation attempts.

What systems are affected by CVE-2022-35991?

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

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

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

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 9
ISO 42001: 8.4
NIST AI RMF: GOVERN 1.7, MANAGE 2.4

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. When `TensorListScatter` and `TensorListScatterV2` receive an `element_shape` of a rank greater than one, they give a `CHECK` fail that can trigger a denial of service attack. We have patched the issue in GitHub commit bb03fdf4aae944ab2e4b35c7daa051068a8b7f61. 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 an organization's public-facing ML API (e.g., a fraud detection or recommendation model served via TensorFlow Serving) crafts a POST request with a tensor payload where element_shape has rank 2 or higher. When TensorListScatter processes this input, the internal CHECK assertion fires, triggering a C++ abort that crashes the TF process. Repeated at low frequency, this sustains a DoS condition against the inference tier. In a Kubernetes deployment without proper liveness probes, this can cause extended service degradation. No ML expertise required — the attack is equivalent to sending a malformed HTTP request to a web server.

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