CVE-2022-35959: TensorFlow: DoS via AvgPool3DGradOp input overflow

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

A network-accessible denial-of-service flaw in TensorFlow's 3D pooling gradient operator lets unauthenticated attackers crash ML serving endpoints with a single crafted request. Any production TF deployment accepting user-controlled tensor shapes is at risk. No workarounds exist — patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2.

Risk Assessment

High severity (CVSS 7.5) with a trivially exploitable, zero-auth, network-accessible attack path. The overflow-to-CHECK-failure chain requires no ML expertise — just a malformed API call. Impact is strictly availability (DoS); no data exfiltration or code execution surface exists. Risk is concentrated in TensorFlow Serving deployments exposed to untrusted networks or multi-tenant inference APIs. Not in CISA KEV and no active exploitation reported, but the AC:L/PR:N/UI:N vector justifies immediate patching over deferred scheduling.

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. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (fix in commit 9178ac9d).

  2. Input validation: Enforce strict tensor shape schema validation at the API gateway before requests reach the model — reject shapes outside expected bounds, especially for orig_input_shape parameters.

  3. Rate limiting: Apply per-client rate limits on inference endpoints to reduce sustained DoS impact.

  4. Detection: Alert on unexpected TF Serving process crashes or CHECK failure log entries (grep for 'Check failed' in TF logs).

  5. Network segmentation: Do not expose TF Serving directly to the public internet — require authenticated, authorized access to all inference endpoints.

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
Clause 8.4 - AI system operation and monitoring
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain the value of AI systems are maintained
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-35959?

A network-accessible denial-of-service flaw in TensorFlow's 3D pooling gradient operator lets unauthenticated attackers crash ML serving endpoints with a single crafted request. Any production TF deployment accepting user-controlled tensor shapes is at risk. No workarounds exist — patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2.

Is CVE-2022-35959 actively exploited?

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

How to fix CVE-2022-35959?

1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (fix in commit 9178ac9d). 2. Input validation: Enforce strict tensor shape schema validation at the API gateway before requests reach the model — reject shapes outside expected bounds, especially for orig_input_shape parameters. 3. Rate limiting: Apply per-client rate limits on inference endpoints to reduce sustained DoS impact. 4. Detection: Alert on unexpected TF Serving process crashes or CHECK failure log entries (grep for 'Check failed' in TF logs). 5. Network segmentation: Do not expose TF Serving directly to the public internet — require authenticated, authorized access to all inference endpoints.

What systems are affected by CVE-2022-35959?

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

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

CVE-2022-35959 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. The implementation of `AvgPool3DGradOp` does not fully validate the input `orig_input_shape`. This results in an overflow that results in a `CHECK` failure which can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 9178ac9d6389bdc54638ab913ea0e419234d14eb. 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 TF Serving endpoint running a video classification or 3D medical imaging model containing AvgPool3D layers. They submit a gRPC or HTTP inference request with an intentionally malformed orig_input_shape — e.g., an extremely large, zero, or negative tensor dimension — crafted to trigger an integer overflow in AvgPool3DGradOp. The overflow causes a CHECK assertion failure, immediately crashing the TF Serving process. With no authentication required and reproducible results, the adversary can script repeated requests to maintain persistent service disruption, effectively taking down model inference for all downstream applications and users sharing the 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