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.

What is the risk?

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.

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
1.1%
chance of exploitation in 30 days
Higher than 61% 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, 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 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 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
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 1.08%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesmodel evaluation platformsAutoML pipelinesbatch inference

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: Art. 15
ISO 42001: A.8.3
NIST AI RMF: MANAGE 4.1
OWASP LLM Top 10: LLM05:2023

What are the technical details?

Original Advisory

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)

CWE-476 — NULL Pointer Dereference: The product dereferences a pointer that it expects to be valid but is NULL.

  • [Implementation] For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
  • [Requirements] Select a programming language that is not susceptible to these issues.

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