CVE-2022-35974: TensorFlow: DoS via nonscalar quantization op input

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

A remotely exploitable DoS in TensorFlow's quantization pipeline lets an unauthenticated attacker crash any inference service running models with the QuantizeDownAndShrinkRange op. No authentication, no user interaction, network-accessible — CVSS 7.5. Patch to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; no workaround exists.

Risk Assessment

HIGH risk for organizations running public-facing TensorFlow inference services with quantized models. Zero prerequisites make this trivially exploitable: any client submitting inference requests can trigger a segfault and crash the serving process. Impact is availability-only (no data exfiltration risk), but automated restart loops can be exploited to maintain sustained outages. Internal training pipelines that ingest external data are also exposed.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 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 (fix: commit 73ad1815).

  2. If patching is delayed: enforce server-side scalar validation on input_min and input_max before passing tensors to TF ops.

  3. Deploy input sanitization / WAF in front of all model serving endpoints.

  4. Configure liveness probes and process supervisors with backoff to limit restart-loop exploitation.

  5. Monitor serving infrastructure for unexpected process crashes or SIGSEGV signals as indicators of exploitation.

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.6.2.5 - AI system availability and resilience
NIST AI RMF
MS-2.5 - Manage risks related to AI system failures and vulnerabilities
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-35974?

A remotely exploitable DoS in TensorFlow's quantization pipeline lets an unauthenticated attacker crash any inference service running models with the QuantizeDownAndShrinkRange op. No authentication, no user interaction, network-accessible — CVSS 7.5. Patch to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; no workaround exists.

Is CVE-2022-35974 actively exploited?

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

How to fix CVE-2022-35974?

1. Patch immediately: upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (fix: commit 73ad1815). 2. If patching is delayed: enforce server-side scalar validation on input_min and input_max before passing tensors to TF ops. 3. Deploy input sanitization / WAF in front of all model serving endpoints. 4. Configure liveness probes and process supervisors with backoff to limit restart-loop exploitation. 5. Monitor serving infrastructure for unexpected process crashes or SIGSEGV signals as indicators of exploitation.

What systems are affected by CVE-2022-35974?

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

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

CVE-2022-35974 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 `QuantizeDownAndShrinkRange` is given nonscalar inputs for `input_min` or `input_max`, it results in a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 73ad1815ebcfeb7c051f9c2f7ab5024380ca8613. 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

Adversary identifies a public TensorFlow Serving endpoint (gRPC or REST) running a quantized model. Using standard TF Serving client libraries, they craft an inference request with nonscalar tensors for input_min or input_max — trivially constructed with numpy or tf.constant. The QuantizeDownAndShrinkRange op receives invalid input, segfaults, and crashes the serving process. No ML expertise required; basic input fuzzing surfaces this behavior. Under auto-restart configurations, the adversary loops requests to sustain a prolonged outage of the inference service.

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