CVE-2022-35970: TensorFlow: DoS via malformed QuantizedInstanceNorm tensors

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow Serving deployment running quantized models is vulnerable to unauthenticated remote crash — no credentials, no 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 inference endpoints are internet-exposed, treat this as critical regardless of the CVSS score.

What is the risk?

CVSS 7.5 understates operational risk for AI infrastructure teams. The attack is network-accessible, requires zero authentication, and needs no user interaction — a script-kiddie can trigger it by sending a single malformed request. While confidentiality and integrity are unaffected, availability loss of a production inference service directly impacts revenue and SLA for any organization with real-time ML workloads. Risk escalates significantly when TF Serving endpoints are exposed without an API gateway or authentication layer.

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 32% 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 TensorFlow to 2.10.0 or apply cherrypick commits to 2.9.1, 2.8.1, or 2.7.2 (commit 785d67a78a1d533759fcd2f5e8d6ef778de849e0).

  2. No workaround exists — patching is the only fix.

  3. Defense-in-depth: Place API gateways with authentication in front of all TF Serving endpoints; reject unauthenticated inference requests.

  4. Input validation at the gateway layer: reject tensors with unexpected rank shapes before they reach TF Serving.

  5. Monitor for inference service process crashes or unexpected restarts as an indicator of exploitation attempts.

  6. Audit your model serving stack for use of quantized ops (grep model graphs for QuantizedInstanceNorm).

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 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.5 - AI system availability and resilience
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain AI system effectiveness and trustworthiness
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-35970?

Any TensorFlow Serving deployment running quantized models is vulnerable to unauthenticated remote crash — no credentials, no 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 inference endpoints are internet-exposed, treat this as critical regardless of the CVSS score.

Is CVE-2022-35970 actively exploited?

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

How to fix CVE-2022-35970?

1. Patch: Upgrade TensorFlow to 2.10.0 or apply cherrypick commits to 2.9.1, 2.8.1, or 2.7.2 (commit 785d67a78a1d533759fcd2f5e8d6ef778de849e0). 2. No workaround exists — patching is the only fix. 3. Defense-in-depth: Place API gateways with authentication in front of all TF Serving endpoints; reject unauthenticated inference requests. 4. Input validation at the gateway layer: reject tensors with unexpected rank shapes before they reach TF Serving. 5. Monitor for inference service process crashes or unexpected restarts as an indicator of exploitation attempts. 6. Audit your model serving stack for use of quantized ops (grep model graphs for QuantizedInstanceNorm).

What systems are affected by CVE-2022-35970?

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

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

CVE-2022-35970 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.40%.

What is the AI security impact?

Affected AI Architectures

quantized model servingmodel servingedge AI deploymentinference endpointstraining pipelines

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.5
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM04

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. If `QuantizedInstanceNorm` is given `x_min` or `x_max` 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 785d67a78a1d533759fcd2f5e8d6ef778de849e0. 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 discovers a TF Serving endpoint (e.g., via Shodan, port scan, or leaked internal API documentation). They craft an inference request that passes a non-scalar tensor (rank > 0) as the x_min or x_max input to a model containing QuantizedInstanceNorm. The TF runtime performs no rank validation, triggers a segfault in the serving process, and the inference server crashes. On Kubernetes or systemd-managed deployments the service auto-restarts, allowing a sustained low-rate DoS. On bare-metal or poorly monitored deployments, this can cause extended outages. No ML expertise required — just knowledge of TensorFlow's protobuf input format.

Weaknesses (CWE)

CWE-20 — Improper Input Validation: The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

  • [Architecture and Design] Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build "recognizers" for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111]
  • [Architecture and Design] Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).

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