CVE-2022-35963: TensorFlow: DoS via FractionalAvgPoolGrad overflow

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow deployment (2.7.x–2.9.x) exposing model inference endpoints is vulnerable to unauthenticated remote crashes via malformed tensor shapes — no privileges or user interaction required. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2; there are no workarounds. If patching is delayed, enforce strict input shape validation at the API gateway layer before requests reach TensorFlow ops.

Risk Assessment

High operational risk for AI inference infrastructure. CVSS 7.5 reflects network-accessible, zero-auth, low-complexity exploitation with full availability impact. The attack surface is broad — any model using FractionalAvgPool layers (common in image classification architectures) served over an HTTP/gRPC endpoint is reachable. No confidentiality or integrity impact limits blast radius to service availability, but crashing ML serving infrastructure can be high-impact in production AI pipelines.

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

6 steps
  1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit 03a659d7).

  2. No workaround exists per vendor advisory.

  3. Compensating control: Enforce tensor shape bounds validation at API ingress (max dimensions, max element counts) before forwarding to TF runtime.

  4. Harden serving layer: Configure TF Serving with process auto-restart and health-check probes to minimize recovery time if exploited.

  5. Audit: Identify all models in your registry using FractionalAvgPool/FractionalAvgPoolGrad layers — prioritize those exposed to external or untrusted input sources.

  6. Monitor: Alert on abnormal CHECK failure crashes or OOM signals in TF Serving logs.

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 17 - Quality management system Article 9 - Risk management system
ISO 42001
6.1.2 - AI risk assessment 8.4 - AI system operation
NIST AI RMF
GOVERN-1.1 - Policies and procedures for AI risk management MANAGE-2.2 - Mechanisms for responding to AI risks

Frequently Asked Questions

What is CVE-2022-35963?

Any TensorFlow deployment (2.7.x–2.9.x) exposing model inference endpoints is vulnerable to unauthenticated remote crashes via malformed tensor shapes — no privileges or user interaction required. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2; there are no workarounds. If patching is delayed, enforce strict input shape validation at the API gateway layer before requests reach TensorFlow ops.

Is CVE-2022-35963 actively exploited?

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

How to fix CVE-2022-35963?

1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit 03a659d7). 2. No workaround exists per vendor advisory. 3. Compensating control: Enforce tensor shape bounds validation at API ingress (max dimensions, max element counts) before forwarding to TF runtime. 4. Harden serving layer: Configure TF Serving with process auto-restart and health-check probes to minimize recovery time if exploited. 5. Audit: Identify all models in your registry using FractionalAvgPool/FractionalAvgPoolGrad layers — prioritize those exposed to external or untrusted input sources. 6. Monitor: Alert on abnormal CHECK failure crashes or OOM signals in TF Serving logs.

What systems are affected by CVE-2022-35963?

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

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

CVE-2022-35963 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 `FractionalAvgPoolGrad` does not fully validate the input `orig_input_tensor_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 03a659d7be9a1154fdf5eeac221e5950fec07dad. 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 public-facing model inference API powered by TensorFlow Serving. The deployed model (e.g., an image classifier using FractionalAvgPool for spatial downsampling) accepts user-supplied image tensors. The attacker crafts a POST request to the /v1/models/:model/versions/:version:predict endpoint with a malformed orig_input_tensor_shape that causes an integer overflow in FractionalAvgPoolGrad during backpropagation or gradient computation. The overflow triggers an internal CHECK assertion failure, crashing the TF Serving process. With no restart policy in place, the model endpoint becomes unavailable. In a serverless or Kubernetes environment without liveness probes, this becomes a sustained outage. The attack requires only knowledge of the endpoint URL and HTTP access — no authentication or ML expertise needed.

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