CVE-2022-23579: TensorFlow: DoS via Grappler optimizer CHECK failure

MEDIUM PoC AVAILABLE CISA: TRACK*
Published February 4, 2022
CISO Take

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
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
6.5 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 46% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  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'.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
8.4 - AI System Operation and Monitoring
NIST AI RMF
MANAGE-2.2 - Risks from third-party entities are managed
OWASP LLM Top 10
LLM05 - Supply Chain Vulnerabilities

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

Timeline

Published
February 4, 2022
Last Modified
November 21, 2024
First Seen
February 4, 2022

Related Vulnerabilities