CVE-2022-23593: TensorFlow MLIR-TFRT: DoS via scalar shape segfault
HIGH PoC AVAILABLEAny 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 |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade to TensorFlow 2.8.0 (contains the fix) or apply commit 35f0fabb4c178253a964d7aabdbb15c6a398b69a.
-
WORKAROUND (if immediate patching not possible): Add input validation to reject or reshape scalar tensors before they reach MLIR-TFRT compilation.
-
NETWORK CONTROLS
Place TF Serving endpoints behind an API gateway that enforces minimum tensor rank requirements.
-
DETECTION
Monitor for abnormal process terminations or segfaults (SIGSEGV) in TensorFlow serving processes — alert on unexpected model server restarts.
-
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:
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.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/blob/274df9b02330b790aa8de1cee164b70f72b9b244/tensorflow/compiler/mlir/tfrt/jit/transforms/tf_cpurt_symbolic_shape_optimization.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/35f0fabb4c178253a964d7aabdbb15c6a398b69a Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-gwcx-jrx4-92w2 Patch 3rd Party
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow
AI Threat Alert