CVE-2022-36005: TensorFlow: DoS via CHECK fail in fake_quant gradient

HIGH PoC AVAILABLE
Published September 16, 2022
CISO Take

A remotely exploitable denial-of-service in TensorFlow's quantization gradient API allows any unauthenticated attacker to crash inference or training services by sending nonscalar min/max inputs. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; there are no workarounds. If your ML serving infrastructure is internet-facing and uses quantization operations, treat this as urgent.

What is the risk?

High exploitability: CVSS 7.5, network-accessible, zero authentication, low complexity. The CHECK assertion failure terminates the TensorFlow process, making this a reliable crash trigger. No code execution or data leakage, but availability impact on inference or training pipelines is severe. Quantization is a standard step in edge-deployment workflows, widening the exposed surface.

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 30% 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?

5 steps
  1. Patch: upgrade to TensorFlow 2.10.0, or cherrypick commit f3cf67ac5705f4f04721d15e485e192bb319feed on 2.9.x, 2.8.x, 2.7.x.

  2. No official workaround exists per the advisory.

  3. Interim defense: add input validation layer upstream to enforce scalar shape on min/max parameters before reaching fake_quant_with_min_max_vars_gradient.

  4. Deploy rate-limiting and anomaly detection on inference API endpoints to detect repeated crash-restart cycles.

  5. Run TF Serving in containerized environments with auto-restart policies to minimize downtime if exploited before patching.

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.6 - Availability of AI systems
NIST AI RMF
MANAGE 2.4 - Residual risks and errors are monitored and documented MEASURE 2.5 - Robustness of AI system is evaluated

Frequently Asked Questions

What is CVE-2022-36005?

A remotely exploitable denial-of-service in TensorFlow's quantization gradient API allows any unauthenticated attacker to crash inference or training services by sending nonscalar min/max inputs. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; there are no workarounds. If your ML serving infrastructure is internet-facing and uses quantization operations, treat this as urgent.

Is CVE-2022-36005 actively exploited?

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

How to fix CVE-2022-36005?

1. Patch: upgrade to TensorFlow 2.10.0, or cherrypick commit f3cf67ac5705f4f04721d15e485e192bb319feed on 2.9.x, 2.8.x, 2.7.x. 2. No official workaround exists per the advisory. 3. Interim defense: add input validation layer upstream to enforce scalar shape on min/max parameters before reaching fake_quant_with_min_max_vars_gradient. 4. Deploy rate-limiting and anomaly detection on inference API endpoints to detect repeated crash-restart cycles. 5. Run TF Serving in containerized environments with auto-restart policies to minimize downtime if exploited before patching.

What systems are affected by CVE-2022-36005?

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

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

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

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesinference

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0034 Cost Harvesting
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.4, MEASURE 2.5

What are the technical details?

Original Advisory

TensorFlow is an open source platform for machine learning. When `tf.quantization.fake_quant_with_min_max_vars_gradient` receives input `min` or `max` that is nonscalar, it gives a `CHECK` fail that can trigger a denial of service attack. We have patched the issue in GitHub commit f3cf67ac5705f4f04721d15e485e192bb319feed. 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

An adversary identifies a public-facing TensorFlow Serving endpoint that accepts model inputs processed through quantization operations. They craft a request containing a nonscalar tensor (e.g., a 1D array instead of a scalar) for the min or max parameter of the quantization gradient operation. Upon receiving the malformed input, TensorFlow triggers a CHECK assertion failure and the serving process crashes. By automating repeated requests, the adversary maintains continuous DoS, preventing legitimate model inference. This requires no ML expertise—only knowledge of the TF API signature and a basic HTTP client.

Weaknesses (CWE)

CWE-617 — Reachable Assertion: The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.

  • [Implementation] Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources)
  • [Implementation] Perform input validation on user data.

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