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.

Risk Assessment

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.

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 35% 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 — 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.

Classification

Compliance Impact

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

Technical Details

NVD Description

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)

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