CVE-2022-23589: TensorFlow Grappler: DoS via malicious SavedModel

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

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
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.3%
chance of exploitation in 30 days
Higher than 53% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
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 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.

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
Art. 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.8.3 - AI system security
NIST AI RMF
MANAGE 4.1 - Residual risks to individuals and society are managed
OWASP LLM Top 10
LLM05:2023 - Supply Chain Vulnerabilities

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

Timeline

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

Related Vulnerabilities