CVE-2022-29192: TensorFlow: DoS via QuantizeAndDequantize input validation
MEDIUM PoC AVAILABLE CISA: TRACK*A local attacker with low privileges can crash TensorFlow processes by passing malformed arguments to the QuantizeAndDequantizeV4Grad op, triggering a CHECK-failure assertion. Patch immediately to TF 2.6.4, 2.7.2, 2.8.1, or 2.9.0+ if your ML infrastructure runs on affected versions. Risk is limited to availability — no data exfiltration or code execution vector exists here.
What is the risk?
Medium severity with limited real-world blast radius. The local attack vector (AV:L) is the key constraint — an adversary needs an existing foothold on the machine running TensorFlow. In shared ML compute environments (JupyterHub clusters, multi-tenant GPU nodes, CI/CD runners), this becomes more concerning since a low-privileged user could disrupt training jobs or crash inference services. CVSS 5.5 is accurate; exploitability is straightforward once local access exists, but gaining that access is the hard part.
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 TensorFlow to 2.6.4, 2.7.2, 2.8.1, or 2.9.0+. Verify via
pip show tensorflow. -
Isolation: Restrict local access to ML compute nodes — minimize shared JupyterHub instances and enforce per-user containerization.
-
Input validation: If accepting external model inference requests, validate and sanitize gradient operation inputs at the API boundary before passing to TF ops.
-
Detection: Monitor for abnormal TensorFlow process crashes (CHECK-failure logs contain 'Check failed:'); correlate with unexpected local logins or CI job failures.
-
Workaround: If patching is not immediately possible, disable or restrict access to raw TF op endpoints.
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-29192?
A local attacker with low privileges can crash TensorFlow processes by passing malformed arguments to the QuantizeAndDequantizeV4Grad op, triggering a CHECK-failure assertion. Patch immediately to TF 2.6.4, 2.7.2, 2.8.1, or 2.9.0+ if your ML infrastructure runs on affected versions. Risk is limited to availability — no data exfiltration or code execution vector exists here.
Is CVE-2022-29192 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-29192, increasing the risk of exploitation.
How to fix CVE-2022-29192?
1. Patch: Upgrade TensorFlow to 2.6.4, 2.7.2, 2.8.1, or 2.9.0+. Verify via `pip show tensorflow`. 2. Isolation: Restrict local access to ML compute nodes — minimize shared JupyterHub instances and enforce per-user containerization. 3. Input validation: If accepting external model inference requests, validate and sanitize gradient operation inputs at the API boundary before passing to TF ops. 4. Detection: Monitor for abnormal TensorFlow process crashes (CHECK-failure logs contain 'Check failed:'); correlate with unexpected local logins or CI job failures. 5. Workaround: If patching is not immediately possible, disable or restrict access to raw TF op endpoints.
What systems are affected by CVE-2022-29192?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, model compression workflows, MLOps platforms.
What is the CVSS score for CVE-2022-29192?
CVE-2022-29192 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.34%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service AML.T0043.003 Manual Modification Compliance Controls Affected
What are the technical details?
Original Advisory
TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.QuantizeAndDequantizeV4Grad` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
Exploitation Scenario
An insider threat or attacker who has compromised a data scientist's account on a shared ML cluster deliberately calls `tf.raw_ops.QuantizeAndDequantizeV4Grad` with crafted tensor arguments that fail internal validation checks. The resulting CHECK-failure crashes the TensorFlow process, killing ongoing training jobs and potentially corrupting checkpoints. In a multi-tenant Kubernetes environment with a shared TF serving deployment, the same input sent to a quantized model's inference endpoint terminates the serving pod, causing a denial of service affecting all downstream applications consuming that model.
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:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/quantize_and_dequantize_op.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/098e7762d909bac47ce1dbabe6dfd06294cb9d58 Patch 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.6.4 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.7.2 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.8.1 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.9.0 Release 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-h2wq-prv9-2f56 Exploit 3rd Party
- github.com/gclonly/im Exploit
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