CVE-2022-23589: TensorFlow Grappler: DoS via malicious SavedModel
MEDIUM PoC AVAILABLE CISA: TRACK*An authenticated attacker can crash TensorFlow by supplying a crafted SavedModel file, triggering a null pointer dereference in the Grappler optimizer. Impact is availability-only — no data exfiltration risk — but any shared ML inference or training platform accepting external models is exposed. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3, and restrict who can submit models for evaluation.
Risk Assessment
Medium risk overall, but elevated in multi-tenant or shared ML infrastructure. Network-accessible with low attack complexity and only low privileges required makes exploitation straightforward for any authenticated platform user. The blast radius is limited to service availability (A:H), with zero confidentiality or integrity impact. Not in CISA KEV and no evidence of active exploitation, but the low bar to trigger it warrants prompt patching in exposed environments.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Patch: upgrade to TensorFlow 2.8.0, or apply backports to 2.7.1, 2.6.3, or 2.5.3.
-
Restrict model ingestion: enforce allowlists for model sources; reject SavedModel files from untrusted origins before they reach the optimizer.
-
Sandboxing: run model loading and evaluation in isolated processes or containers with resource limits to contain crash impact.
-
Monitor: alert on abnormal TensorFlow process crashes or OOM signals in serving infrastructure.
-
Detection: scan model files with TF's SavedModel validator before loading in production pipelines.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-23589?
An authenticated attacker can crash TensorFlow by supplying a crafted SavedModel file, triggering a null pointer dereference in the Grappler optimizer. Impact is availability-only — no data exfiltration risk — but any shared ML inference or training platform accepting external models is exposed. Patch immediately to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3, and restrict who can submit models for evaluation.
Is CVE-2022-23589 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23589, increasing the risk of exploitation.
How to fix CVE-2022-23589?
1. Patch: upgrade to TensorFlow 2.8.0, or apply backports to 2.7.1, 2.6.3, or 2.5.3. 2. Restrict model ingestion: enforce allowlists for model sources; reject SavedModel files from untrusted origins before they reach the optimizer. 3. Sandboxing: run model loading and evaluation in isolated processes or containers with resource limits to contain crash impact. 4. Monitor: alert on abnormal TensorFlow process crashes or OOM signals in serving infrastructure. 5. Detection: scan model files with TF's SavedModel validator before loading in production pipelines.
What systems are affected by CVE-2022-23589?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, model evaluation platforms, AutoML pipelines, batch inference.
What is the CVSS score for CVE-2022-23589?
CVE-2022-23589 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.30%.
Technical Details
NVD Description
Tensorflow is an Open Source Machine Learning Framework. Under certain scenarios, Grappler component of TensorFlow can trigger a null pointer dereference. There are 2 places where this can occur, for the same malicious alteration of a `SavedModel` file (fixing the first one would trigger the same dereference in the second place). First, during constant folding, the `GraphDef` might not have the required nodes for the binary operation. If a node is missing, the correposning `mul_*child` would be null, and the dereference in the subsequent line would be incorrect. We have a similar issue during `IsIdentityConsumingSwitch`. 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 low-privileged access to a shared ML platform (e.g., a data scientist account on an internal model registry or a public ML-as-a-service endpoint) uploads a specially crafted SavedModel that is missing required nodes for a binary operation in its GraphDef. When the platform's TensorFlow runtime loads the model and Grappler's constant folding optimizer attempts to process it, the missing node causes `mul_*child` to be null. The subsequent dereference crashes the TensorFlow process, denying service to all users of that inference endpoint until it is restarted — a low-effort, repeatable DoS against shared AI infrastructure.
Weaknesses (CWE)
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/grappler/mutable_graph_view.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/045deec1cbdebb27d817008ad5df94d96a08b1bf Patch 3rd Party
- github.com/tensorflow/tensorflow/commit/0a365c029e437be0349c31f8d4c9926b69fa3fa1 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-9px9-73fg-3fqp Patch 3rd Party
- github.com/ARPSyndicate/cvemon 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
AI Threat Alert