CVE-2022-23588: TensorFlow: DoS via crafted SavedModel crashes Grappler
MEDIUM PoC AVAILABLE CISA: TRACK*If your ML pipelines load SavedModels from untrusted or user-supplied sources, this is an exploitable crash. An attacker with low privileges who can submit a SavedModel can take down your inference or training service. Patch to TF 2.8.0 / 2.7.1 / 2.6.3 / 2.5.3 and restrict who can submit models for loading.
What is the risk?
Medium severity but operationally significant for exposed model-serving endpoints. CVSS 6.5 with network-accessible, low-complexity exploitation requiring only low privileges makes this achievable by any authenticated user or insider. No code execution or data exfiltration, but availability impact is high — a single malformed SavedModel triggers an unrecoverable process crash. Risk escalates in multi-tenant model serving platforms or CI/CD pipelines that automatically load externally sourced models.
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.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately.
-
RESTRICT
Enforce strict provenance controls on SavedModel ingestion — only load models from cryptographically signed, internal sources.
-
SANDBOX
Run model loading in isolated processes or containers so a crash does not bring down the entire inference service.
-
VALIDATE
Add pre-load integrity checks (hash verification, schema validation) before passing SavedModels to the optimizer.
-
DETECT
Monitor for unexpected TensorFlow process crashes or restarts in serving infrastructure — repeated crashes from the same model source are an IOC.
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-23588?
If your ML pipelines load SavedModels from untrusted or user-supplied sources, this is an exploitable crash. An attacker with low privileges who can submit a SavedModel can take down your inference or training service. Patch to TF 2.8.0 / 2.7.1 / 2.6.3 / 2.5.3 and restrict who can submit models for loading.
Is CVE-2022-23588 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23588, increasing the risk of exploitation.
How to fix CVE-2022-23588?
1. PATCH: Upgrade to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately. 2. RESTRICT: Enforce strict provenance controls on SavedModel ingestion — only load models from cryptographically signed, internal sources. 3. SANDBOX: Run model loading in isolated processes or containers so a crash does not bring down the entire inference service. 4. VALIDATE: Add pre-load integrity checks (hash verification, schema validation) before passing SavedModels to the optimizer. 5. DETECT: Monitor for unexpected TensorFlow process crashes or restarts in serving infrastructure — repeated crashes from the same model source are an IOC.
What systems are affected by CVE-2022-23588?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML model registries, inference pipelines.
What is the CVSS score for CVE-2022-23588?
CVE-2022-23588 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.85%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011.000 Unsafe AI Artifacts AML.T0029 Denial of AI Service AML.T0043 Craft Adversarial Data Compliance Controls Affected
What are the technical details?
Original Advisory
Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that Grappler optimizer would attempt to build a tensor using a reference `dtype`. This would result in a crash due to a `CHECK`-fail in the `Tensor` constructor as reference types are not allowed. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
Exploitation Scenario
An adversary with a low-privilege account on a shared ML platform (e.g., a data scientist account on an internal model registry or a customer account on a multi-tenant MLaaS product) uploads a specially crafted SavedModel where the Grappler constant folding pass attempts to construct a Tensor with a reference dtype. When the platform's automated pipeline or inference server loads the model, TensorFlow hits a CHECK-fail assertion in tensor.cc and crashes. By automating re-uploads, the attacker maintains a persistent DoS against the serving endpoint without any elevated privileges.
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:L/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/framework/tensor.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/constant_folding.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/6b5adc0877de832b2a7c189532dbbbc64622eeb6 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-fx5c-h9f6-rv7c Patch 3rd Party
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-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow