CVE-2022-23593: TensorFlow MLIR-TFRT: DoS via scalar shape segfault

HIGH PoC AVAILABLE
Published February 4, 2022
CISO Take

Any TensorFlow 2.7.x deployment using MLIR-TFRT JIT compilation can be crashed remotely with no authentication required by sending scalar-shaped tensors — CVSS 7.5 with zero complexity. Patch to TensorFlow 2.8.0 immediately; if patching is delayed, isolate TF serving endpoints from untrusted network input. This is a single affected version with a confirmed fix, making remediation straightforward.

Risk Assessment

High risk for internet-exposed TensorFlow inference services. CVSS AV:N/AC:L/PR:N/UI:N means any unauthenticated network attacker can trigger the crash with minimal effort — no AI/ML expertise required, just a scalar-shaped tensor input. Impact is pure availability: no data exfiltration path. The blast radius is limited to deployments specifically using the MLIR-TFRT JIT compilation path (TF 2.7.x only), but those running ML-as-a-Service with public endpoints face real disruption risk.

Affected Systems

Package Ecosystem Vulnerable Range Patched
tensorflow pip No patch
195.0K OpenSSF 7.2 3.7K dependents Pushed today 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
7.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
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 None
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  1. PATCH

    Upgrade to TensorFlow 2.8.0 (contains the fix) or apply commit 35f0fabb4c178253a964d7aabdbb15c6a398b69a.

  2. WORKAROUND (if immediate patching not possible): Add input validation to reject or reshape scalar tensors before they reach MLIR-TFRT compilation.

  3. NETWORK CONTROLS

    Place TF Serving endpoints behind an API gateway that enforces minimum tensor rank requirements.

  4. DETECTION

    Monitor for abnormal process terminations or segfaults (SIGSEGV) in TensorFlow serving processes — alert on unexpected model server restarts.

  5. VERIFY

    Confirm your TF deployment version with import tensorflow as tf; print(tf.__version__) — only 2.7.x is affected.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.5 - AI system availability and resilience
NIST AI RMF
MANAGE-2.2 - Mechanisms to sustain the value of AI systems MAP-5.1 - Likelihood of undesirable outcomes examined
OWASP LLM Top 10
LLM05:2025 - Insecure Output Handling / Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2022-23593?

Any TensorFlow 2.7.x deployment using MLIR-TFRT JIT compilation can be crashed remotely with no authentication required by sending scalar-shaped tensors — CVSS 7.5 with zero complexity. Patch to TensorFlow 2.8.0 immediately; if patching is delayed, isolate TF serving endpoints from untrusted network input. This is a single affected version with a confirmed fix, making remediation straightforward.

Is CVE-2022-23593 actively exploited?

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

How to fix CVE-2022-23593?

1. PATCH: Upgrade to TensorFlow 2.8.0 (contains the fix) or apply commit 35f0fabb4c178253a964d7aabdbb15c6a398b69a. 2. WORKAROUND (if immediate patching not possible): Add input validation to reject or reshape scalar tensors before they reach MLIR-TFRT compilation. 3. NETWORK CONTROLS: Place TF Serving endpoints behind an API gateway that enforces minimum tensor rank requirements. 4. DETECTION: Monitor for abnormal process terminations or segfaults (SIGSEGV) in TensorFlow serving processes — alert on unexpected model server restarts. 5. VERIFY: Confirm your TF deployment version with `import tensorflow as tf; print(tf.__version__)` — only 2.7.x is affected.

What systems are affected by CVE-2022-23593?

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

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

CVE-2022-23593 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.31%.

Technical Details

NVD Description

Tensorflow is an Open Source Machine Learning Framework. The `simplifyBroadcast` function in the MLIR-TFRT infrastructure in TensorFlow is vulnerable to a segfault (hence, denial of service), if called with scalar shapes. If all shapes are scalar, then `maxRank` is 0, so we build an empty `SmallVector`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.

Exploitation Scenario

Attacker discovers a public-facing TensorFlow Serving endpoint (e.g., a model inference API). They craft a gRPC or REST inference request with scalar (rank-0) tensors as input — trivially constructed with any TF client. The request triggers the `simplifyBroadcast` optimization pass in MLIR-TFRT; with all shapes being scalar, `maxRank` is 0 and an empty SmallVector is built without bounds checking, causing a segfault. The TF Serving process crashes, taking the inference API offline. The attacker can loop this at low cost to maintain a persistent DoS against any ML service behind that endpoint.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/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