CVE-2022-23588: TensorFlow: DoS via crafted SavedModel crashes Grappler

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

If your ML pipelines load SavedModels from untrusted or user-supplied sources, this is an exploitable crash. An attacker with low privileges who can submit a SavedModel can take down your inference or training service. Patch to TF 2.8.0 / 2.7.1 / 2.6.3 / 2.5.3 and restrict who can submit models for loading.

Risk Assessment

Medium severity but operationally significant for exposed model-serving endpoints. CVSS 6.5 with network-accessible, low-complexity exploitation requiring only low privileges makes this achievable by any authenticated user or insider. No code execution or data exfiltration, but availability impact is high — a single malformed SavedModel triggers an unrecoverable process crash. Risk escalates in multi-tenant model serving platforms or CI/CD pipelines that automatically load externally sourced models.

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 54% 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, 2.7.1, 2.6.3, or 2.5.3 immediately.

  2. RESTRICT

    Enforce strict provenance controls on SavedModel ingestion — only load models from cryptographically signed, internal sources.

  3. SANDBOX

    Run model loading in isolated processes or containers so a crash does not bring down the entire inference service.

  4. VALIDATE

    Add pre-load integrity checks (hash verification, schema validation) before passing SavedModels to the optimizer.

  5. DETECT

    Monitor for unexpected TensorFlow process crashes or restarts in serving infrastructure — repeated crashes from the same model source are an IOC.

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
6.1 - Actions to address risks and opportunities 8.1 - Operational planning and control
NIST AI RMF
MANAGE-2.2 - Mechanisms to sustain the value of deployed AI
OWASP LLM Top 10
LLM04 - Model Denial of Service LLM05 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-23588?

If your ML pipelines load SavedModels from untrusted or user-supplied sources, this is an exploitable crash. An attacker with low privileges who can submit a SavedModel can take down your inference or training service. Patch to TF 2.8.0 / 2.7.1 / 2.6.3 / 2.5.3 and restrict who can submit models for loading.

Is CVE-2022-23588 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2022-23588, increasing the risk of exploitation.

How to fix CVE-2022-23588?

1. PATCH: Upgrade to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately. 2. RESTRICT: Enforce strict provenance controls on SavedModel ingestion — only load models from cryptographically signed, internal sources. 3. SANDBOX: Run model loading in isolated processes or containers so a crash does not bring down the entire inference service. 4. VALIDATE: Add pre-load integrity checks (hash verification, schema validation) before passing SavedModels to the optimizer. 5. DETECT: Monitor for unexpected TensorFlow process crashes or restarts in serving infrastructure — repeated crashes from the same model source are an IOC.

What systems are affected by CVE-2022-23588?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML model registries, inference pipelines.

What is the CVSS score for CVE-2022-23588?

CVE-2022-23588 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. A malicious user can cause a denial of service by altering a `SavedModel` such that Grappler optimizer would attempt to build a tensor using a reference `dtype`. This would result in a crash due to a `CHECK`-fail in the `Tensor` constructor as reference types are not allowed. 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 account on a multi-tenant MLaaS product) uploads a specially crafted SavedModel where the Grappler constant folding pass attempts to construct a Tensor with a reference dtype. When the platform's automated pipeline or inference server loads the model, TensorFlow hits a CHECK-fail assertion in tensor.cc and crashes. By automating re-uploads, the attacker maintains a persistent DoS against the serving endpoint without any elevated privileges.

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