CVE-2022-35966: TensorFlow: DoS via QuantizedAvgPool input validation

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Remotely exploitable crash in TensorFlow's quantized pooling operation — no credentials or user interaction required. Any TF Serving endpoint or inference API that accepts external tensor inputs and uses quantized models is vulnerable to service disruption. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 and add input shape validation at the API boundary.

Risk Assessment

HIGH for organizations running exposed TensorFlow inference endpoints. CVSS 7.5 reflects the worst-case scenario accurately: network-accessible, zero authentication, zero user interaction. The blast radius is limited to availability (no data exfiltration risk), but a single malformed request crashes the TF process. Quantized models are common in edge/mobile deployments and cost-optimized inference fleets — these environments often lack the defensive hardening of core production APIs.

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 immediately: upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — the fix is in commit 7cdf9d4.

  2. Add input tensor shape validation at the API gateway layer before ops execution; reject any request where min_input or max_input tensors have rank > 0.

  3. Run TF Serving under a process supervisor (systemd, Kubernetes restart policy) to auto-recover from crashes.

  4. Audit which inference endpoints use QuantizedAvgPool-containing graphs — grep SavedModel signatures or TFLite flatbuffers.

  5. Monitor inference service crash rates and process exit events as a detection signal.

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 of high-risk AI systems Article 9 - Risk management system
ISO 42001
6.1.2 - AI risk assessment 8.4 - AI system operation
NIST AI RMF
MANAGE-2.2 - Mechanisms to respond to and recover from AI risks

Frequently Asked Questions

What is CVE-2022-35966?

Remotely exploitable crash in TensorFlow's quantized pooling operation — no credentials or user interaction required. Any TF Serving endpoint or inference API that accepts external tensor inputs and uses quantized models is vulnerable to service disruption. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 and add input shape validation at the API boundary.

Is CVE-2022-35966 actively exploited?

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

How to fix CVE-2022-35966?

1. Patch immediately: upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — the fix is in commit 7cdf9d4. 2. Add input tensor shape validation at the API gateway layer before ops execution; reject any request where min_input or max_input tensors have rank > 0. 3. Run TF Serving under a process supervisor (systemd, Kubernetes restart policy) to auto-recover from crashes. 4. Audit which inference endpoints use QuantizedAvgPool-containing graphs — grep SavedModel signatures or TFLite flatbuffers. 5. Monitor inference service crash rates and process exit events as a detection signal.

What systems are affected by CVE-2022-35966?

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

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

CVE-2022-35966 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. If `QuantizedAvgPool` is given `min_input` or `max_input` tensors of a nonzero rank, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 7cdf9d4d2083b739ec81cfdace546b0c99f50622. 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

Attacker enumerates TF Serving endpoints via port scanning or API discovery. They craft a gRPC or REST prediction request targeting a model that includes QuantizedAvgPool in its graph, passing a 1D or higher-rank tensor for min_input instead of a scalar. TensorFlow does not validate the tensor rank before passing it to the op, triggering a segfault. The inference process crashes, taking down the serving endpoint. This requires no ML expertise — just knowledge that the target uses TensorFlow and sends quantized model inputs. Attack can be repeated to maintain a persistent DoS against auto-restarting services.

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