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.

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

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
6.5 / 10
EPSS
0.8%
chance of exploitation in 30 days
Higher than 52% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

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:

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.81%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesmodel registries

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0011.000 Unsafe AI Artifacts
AML.T0029 Denial of AI Service

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: 8.4
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM05

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] 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

Timeline

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

Related Vulnerabilities