CVE-2022-35981: TensorFlow: DoS via FractionalMaxPoolGrad assertion

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow-based inference or training endpoint accepting user-controlled inputs is vulnerable to unauthenticated remote DoS. Patch immediately to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workaround exists since the crash occurs inside the TF kernel, bypassing application-layer input validation. Prioritize internet-facing model serving endpoints first.

Risk Assessment

High severity (CVSS 7.5) with low exploitation complexity — no authentication or user interaction required over the network. An attacker with access to a TensorFlow serving endpoint can reliably crash it by sending malformed tensor dimensions to FractionalMaxPoolGrad. Not in CISA KEV and no known active exploitation, but the trivial exploit path combined with wide TensorFlow deployment in production ML systems makes this operationally significant for any organization running TF-based model serving at scale.

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 20% 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. Upgrade TensorFlow to 2.10.0 (preferred), or cherrypick patch for 2.9.1, 2.8.1, 2.7.2.

  2. Until patched, restrict network access to TF serving endpoints to trusted networks via firewall/security groups — this is the only effective workaround.

  3. Deploy API gateway-level input shape validation to reject tensors with unexpected dimensions before reaching TF kernels.

  4. Monitor for unexpected process crashes or container restarts in TF serving infrastructure as a detection signal.

  5. Audit ML platform dependencies and pin TensorFlow versions in CI/CD pipelines to patched releases.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact partial

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

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.3 - AI system operation and monitoring
NIST AI RMF
MANAGE 2.2 - Mechanisms are in place to inventory AI risks and manage their treatment
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-35981?

Any TensorFlow-based inference or training endpoint accepting user-controlled inputs is vulnerable to unauthenticated remote DoS. Patch immediately to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workaround exists since the crash occurs inside the TF kernel, bypassing application-layer input validation. Prioritize internet-facing model serving endpoints first.

Is CVE-2022-35981 actively exploited?

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

How to fix CVE-2022-35981?

1. Upgrade TensorFlow to 2.10.0 (preferred), or cherrypick patch for 2.9.1, 2.8.1, 2.7.2. 2. Until patched, restrict network access to TF serving endpoints to trusted networks via firewall/security groups — this is the only effective workaround. 3. Deploy API gateway-level input shape validation to reject tensors with unexpected dimensions before reaching TF kernels. 4. Monitor for unexpected process crashes or container restarts in TF serving infrastructure as a detection signal. 5. Audit ML platform dependencies and pin TensorFlow versions in CI/CD pipelines to patched releases.

What systems are affected by CVE-2022-35981?

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

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

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

Technical Details

NVD Description

TensorFlow is an open source platform for machine learning. `FractionalMaxPoolGrad` validates its inputs with `CHECK` failures instead of with returning errors. If it gets incorrectly sized inputs, the `CHECK` failure can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 8741e57d163a079db05a7107a7609af70931def4. 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 a company's TensorFlow-based image classification inference API sends a crafted HTTP request with a tensor containing incorrect dimensions to the FractionalMaxPoolGrad operation. The operation triggers a CHECK assertion failure, causing the TF process to abort immediately. In a multi-tenant MLaaS environment, a malicious tenant could crash shared serving infrastructure affecting all other customers. The attack is trivially repeatable with no authentication required — a simple loop of malformed requests creates a sustained DoS against the ML endpoint.

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