CVE-2022-35960: TensorFlow: DoS via malformed TensorListReserve input

HIGHPoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow deployment exposing raw ops endpoints—including TF Serving instances—is vulnerable to unauthenticated process crashes via a single malformed request. Patch immediately to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2; no workaround exists. Availability impact only, but a downed inference service is a downed business function.

What is the risk?

CVSS 7.5 with network-accessible attack vector, zero authentication required, and low complexity makes this trivially exploitable by any attacker who can reach a TF endpoint. The blast radius is limited to availability (no data exfiltration or code execution), but in production ML inference pipelines this means complete service disruption. Not in CISA KEV and patched since 2022, so residual risk exists only in unpatched deployments.

What systems are affected?

PackageEcosystemVulnerable RangePatched
TensorFlowpip—No patch
201.3KOpenSSF 7.63.4K dependentsPushed 6d ago4% patched~1372d to patchFull package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.7%
chance of exploitation in 30 days
Higher than 53% 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?

AVACPRUISCIA
AVNetwork
ACLow
PRNone
UINone
SUnchanged
CNone
INone
AHigh

What should I do?

5 steps
  1. Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit b5f6fbf).

  2. No workaround available per upstream advisory—patching is mandatory.

  3. As interim hardening, place input validation/sanitization middleware in front of TF Serving to reject tensors with unexpected shapes before they reach op execution.

  4. Monitor for sudden TF process crashes or repeated inference service restarts as exploitation indicators.

  5. Audit all TF Serving deployments for version; prioritize internet-exposed or multi-tenant instances.

What does CISA's SSVC say?

DecisionTrack
Exploitationnone
AutomatableNo
Technical Impactpartial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 9-Risk Management System
ISO 42001
A.6.2.4-AI System Security and Robustness
NIST AI RMF
GOVERN-1.7-Processes for AI risk monitoring and incident responseMANAGE-2.2-Mechanisms to respond to AI risks

Frequently Asked Questions

What is CVE-2022-35960?

Any TensorFlow deployment exposing raw ops endpoints—including TF Serving instances—is vulnerable to unauthenticated process crashes via a single malformed request. Patch immediately to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2; no workaround exists. Availability impact only, but a downed inference service is a downed business function.

Is CVE-2022-35960 actively exploited?

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

How to fix CVE-2022-35960?

1. Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit b5f6fbf). 2. No workaround available per upstream advisory—patching is mandatory. 3. As interim hardening, place input validation/sanitization middleware in front of TF Serving to reject tensors with unexpected shapes before they reach op execution. 4. Monitor for sudden TF process crashes or repeated inference service restarts as exploitation indicators. 5. Audit all TF Serving deployments for version; prioritize internet-exposed or multi-tenant instances.

What systems are affected by CVE-2022-35960?

This vulnerability affects the following AI/ML architecture patterns: model serving, inference pipelines, training pipelines, multi-tenant ML platforms.

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

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

What is the AI security impact?

Affected AI Architectures

model servinginference pipelinestraining pipelinesmulti-tenant ML platforms

MITRE ATLAS Techniques

AML.T0010.001AI Software
AML.T0029Denial of AI Service
AML.T0049Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 9
ISO 42001: A.6.2.4
NIST AI RMF: GOVERN-1.7, MANAGE-2.2

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. In `core/kernels/list_kernels.cc's TensorListReserve`, `num_elements` is assumed to be a tensor of size 1. When a `num_elements` of more than 1 element is provided, then `tf.raw_ops.TensorListReserve` fails the `CHECK_EQ` in `CheckIsAlignedAndSingleElement`. We have patched the issue in GitHub commit b5f6fbfba76576202b72119897561e3bd4f179c7. 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 attacker identifies a TensorFlow Serving endpoint via active scanning or public cloud enumeration. They craft a gRPC or REST request calling `tf.raw_ops.TensorListReserve` with a `num_elements` tensor containing more than one element—a trivially constructed malformed payload. The assertion `CHECK_EQ` fires in `CheckIsAlignedAndSingleElement`, crashing the TensorFlow process immediately. In a Kubernetes deployment without proper restart policies and health checks, the inference service goes offline. Repeated requests keep it in a crash loop, achieving sustained denial of service against the ML inference backend.

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] If the assertion statement is required (e.g., for security or reliability), change the invoking code to avoid the conditions that trigger the assertion.
  • [Implementation] Consider changing the assertion to some other less "fatal" error. This might not be easy to implement, since other code may be needed to handle the error.

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