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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 3d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

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

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

What should I do?

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.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

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

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference endpointsbatch inference pipelines

MITRE ATLAS Techniques

AML.T0001 Search Open AI Vulnerability Analysis
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 17, Article 9
ISO 42001: 6.1.2, 8.4
NIST AI RMF: GOVERN-1.1, MANAGE-2.2

What are the technical details?

Original Advisory

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)

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] Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources)
  • [Implementation] Perform input validation on user data.

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