CVE-2022-23579: TensorFlow: DoS via Grappler optimizer CHECK failure
MEDIUM PoC AVAILABLE CISA: TRACK*A low-privileged attacker can crash TensorFlow processes by submitting a crafted SavedModel that triggers an assertion failure in the Grappler optimizer. This is a real threat in multi-tenant ML platforms where users can upload or share models. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately; if patching is delayed, restrict who can submit SavedModels to your inference infrastructure.
Risk Assessment
Medium risk overall, but elevated in environments exposing model-loading APIs to external or low-trust users. The low attack complexity and no user-interaction requirement make this reliably exploitable by any authenticated user. Impact is limited to availability (process crash/restart), with no data exfiltration or integrity risk. Multi-tenant ML serving platforms and shared training infrastructure carry the highest exposure.
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 TensorFlow to 2.8.0, 2.7.1, 2.6.3, or 2.5.3.
-
Workaround: Disable Grappler optimization for untrusted SavedModels via RewriterConfig (set all optimizer levels to OFF).
-
Input validation: Validate SavedModel provenance and restrict upload capabilities to authenticated, trusted users only.
-
Isolation: Run model loading in isolated processes or containers so a crash does not impact the main serving fleet.
-
Detection: Alert on unexpected TF process crashes or CHECK failure logs containing 'SafeToRemoveIdentity' or 'dependency_optimizer'.
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-23579?
A low-privileged attacker can crash TensorFlow processes by submitting a crafted SavedModel that triggers an assertion failure in the Grappler optimizer. This is a real threat in multi-tenant ML platforms where users can upload or share models. Patch to TF 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately; if patching is delayed, restrict who can submit SavedModels to your inference infrastructure.
Is CVE-2022-23579 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-23579, increasing the risk of exploitation.
How to fix CVE-2022-23579?
1. Patch: Upgrade TensorFlow to 2.8.0, 2.7.1, 2.6.3, or 2.5.3. 2. Workaround: Disable Grappler optimization for untrusted SavedModels via RewriterConfig (set all optimizer levels to OFF). 3. Input validation: Validate SavedModel provenance and restrict upload capabilities to authenticated, trusted users only. 4. Isolation: Run model loading in isolated processes or containers so a crash does not impact the main serving fleet. 5. Detection: Alert on unexpected TF process crashes or CHECK failure logs containing 'SafeToRemoveIdentity' or 'dependency_optimizer'.
What systems are affected by CVE-2022-23579?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, model registries.
What is the CVSS score for CVE-2022-23579?
CVE-2022-23579 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.23%.
Technical Details
NVD Description
Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `SafeToRemoveIdentity` would trigger `CHECK` failures. 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 on a multi-tenant ML-as-a-service) crafts a malicious TensorFlow SavedModel using publicly available exploit code from the referenced GitHub PoC. They submit this model via the platform's model upload API. When the platform's inference service or CI validation pipeline loads the model, TensorFlow's Grappler dependency optimizer processes the malicious graph, hits the CHECK failure in SafeToRemoveIdentity, and the process terminates. Repeated submissions create a sustained DoS against the model serving 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/optimizers/dependency_optimizer.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/92dba16749fae36c246bec3f9ba474d9ddeb7662 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-5f2r-qp73-37mr 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-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