CVE-2022-35973: TensorFlow: DoS via QuantizedMatMul input validation

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

Any TensorFlow inference service accepting untrusted inputs is vulnerable to a no-auth, network-exploitable crash via malformed quantized model calls. Patch to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately — quantized models are common in production serving for performance optimization, making the blast radius broad. No workaround exists; patching is the only remediation.

Risk Assessment

High exploitability (CVSS 7.5, AV:N/AC:L/PR:N/UI:N) with zero authentication required and trivial reproduction. Impact is confined to availability — no confidentiality or integrity risk. In AI/ML production contexts the risk is amplified: model serving downtime directly disrupts dependent applications and can cascade into SLA violations. Organizations running quantized TF models in customer-facing inference APIs or internal ML pipelines are most exposed. Not in CISA KEV, no confirmed in-the-wild exploitation as of patch date.

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: Upgrade to TensorFlow 2.10.0, 2.9.1 (2.9.x), 2.8.1 (2.8.x), or 2.7.2 (2.7.x) — cherry-picked fix commit aca766ac.

  2. Validate inputs at the API gateway layer: reject nonscalar tensor shapes for min/max quantization parameters before they reach the TF runtime.

  3. Add process-level resilience: configure TF Serving with automatic restart policies and alert on abnormal crash rates.

  4. Network segmentation: restrict inference endpoint exposure to trusted internal networks or authenticated callers — this eliminates the network attack vector entirely.

  5. Detection: monitor for repeated SIGSEGV/segfault logs in TF Serving containers or ML inference hosts as an indicator of exploitation attempts.

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 - AI System Robustness and Resilience
NIST AI RMF
MANAGE 2.2 - Risk Treatment — Residual Risk Monitoring
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2022-35973?

Any TensorFlow inference service accepting untrusted inputs is vulnerable to a no-auth, network-exploitable crash via malformed quantized model calls. Patch to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately — quantized models are common in production serving for performance optimization, making the blast radius broad. No workaround exists; patching is the only remediation.

Is CVE-2022-35973 actively exploited?

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

How to fix CVE-2022-35973?

1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1 (2.9.x), 2.8.1 (2.8.x), or 2.7.2 (2.7.x) — cherry-picked fix commit aca766ac. 2. Validate inputs at the API gateway layer: reject nonscalar tensor shapes for min/max quantization parameters before they reach the TF runtime. 3. Add process-level resilience: configure TF Serving with automatic restart policies and alert on abnormal crash rates. 4. Network segmentation: restrict inference endpoint exposure to trusted internal networks or authenticated callers — this eliminates the network attack vector entirely. 5. Detection: monitor for repeated SIGSEGV/segfault logs in TF Serving containers or ML inference hosts as an indicator of exploitation attempts.

What systems are affected by CVE-2022-35973?

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

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

CVE-2022-35973 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 `QuantizedMatMul` is given nonscalar input for: `min_a`, `max_a`, `min_b`, or `max_b` It gives a segfault that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit aca766ac7693bf29ed0df55ad6bfcc78f35e7f48. 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 or semi-public TensorFlow Serving endpoint using a quantized model (discoverable via API fingerprinting or model metadata leakage). They craft an inference request where min_a, max_a, min_b, or max_b arguments are supplied as tensor arrays instead of scalar values. The QuantizedMatMul kernel performs no shape validation, dereferences an invalid pointer, and segfaults — crashing the serving process. In containerized environments this triggers a pod restart; the adversary floods the endpoint with such requests faster than recovery, maintaining a persistent denial-of-service against the AI inference service with no credentials and minimal tooling.

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