CVE-2022-23579: TensorFlow: DoS via Grappler optimizer CHECK failure
MEDIUMPoC AVAILABLECISA: 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.
What is the risk?
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.
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 stepsPatch: 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'.
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-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.83%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0011.000Unsafe AI ArtifactsAML.T0029Denial of AI ServiceCompliance Controls Affected
What are the technical details?
Original Advisory
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)
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] If the assertion statement is required (e.g., for security or reliability), change the invoking code to avoid the conditions that trigger the assertion.
- [Implementation] Consider changing the assertion to some other less "fatal" error. This might not be easy to implement, since other code may be needed to handle the error.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HReferences
- github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/dependency_optimizer.ccExploit3rd Party
- github.com/tensorflow/tensorflow/commit/92dba16749fae36c246bec3f9ba474d9ddeb7662Patch3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-5f2r-qp73-37mrPatch3rd Party
Timeline
Related Vulnerabilities
CVE-2020-151969.9TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflowCVE-2026-189489.9Feast: insecure UDF deserialization enables RCE
Same package: tensorflowCVE-2020-152059.8TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflowCVE-2019-167789.8TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflowCVE-2020-152089.8TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow