CVE-2022-35973: TensorFlow: DoS via QuantizedMatMul input validation
HIGH PoC AVAILABLEAny 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.
What is the risk?
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.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
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.
-
Validate inputs at the API gateway layer: reject nonscalar tensor shapes for min/max quantization parameters before they reach the TF runtime.
-
Add process-level resilience: configure TF Serving with automatic restart policies and alert on abnormal crash rates.
-
Network segmentation: restrict inference endpoint exposure to trusted internal networks or authenticated callers — this eliminates the network attack vector entirely.
-
Detection: monitor for repeated SIGSEGV/segfault logs in TF Serving containers or ML inference hosts as an indicator of exploitation attempts.
What does CISA's SSVC say?
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:
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.40%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0029 Denial of AI Service AML.T0040 AI Model Inference API Access AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
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)
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 References
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow