CVE-2022-29197: TensorFlow: DoS via UnsortedSegmentJoin input validation
MEDIUM PoC AVAILABLE CISA: TRACK*A missing scalar validation in TensorFlow's UnsortedSegmentJoin op allows any user with local/code execution access to crash TF processes via a crafted input. The local attack vector limits blast radius, but shared ML training platforms and multi-tenant notebook environments (Jupyter, Vertex AI, SageMaker) are the primary exposure. Patch all TF deployments to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 — no workaround exists.
Risk Assessment
Medium risk overall, elevated in multi-tenant ML platforms. CVSS 5.5 reflects the local-only vector, but in practice any environment where external users can submit TF graphs (shared notebooks, model serving endpoints that accept raw ops, CI/CD pipelines processing user-supplied models) becomes a DoS surface with low-skill exploitation. Not in CISA KEV and no public exploit code observed, reducing urgency for air-gapped environments.
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 TensorFlow to ≥2.9.0, 2.8.1 (2.8.x branch), 2.7.2 (2.7.x branch), or 2.6.4 (2.6.x branch). No configuration workaround exists.
-
Restrict model execution: limit which users/services can submit arbitrary TF graphs — enforce allowlisted SavedModel signatures in serving.
-
Isolate training workers: run TF training jobs in sandboxed containers (gVisor, Firecracker) so a crash doesn't cascade.
-
Monitor for CHECK-failure crashes in TF logs (
tensorflow::errors::InvalidArgument) as an anomaly signal. -
Inventory: audit all TF versions across training, serving, and experimentation environments — notebook servers are frequently overlooked.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-29197?
A missing scalar validation in TensorFlow's UnsortedSegmentJoin op allows any user with local/code execution access to crash TF processes via a crafted input. The local attack vector limits blast radius, but shared ML training platforms and multi-tenant notebook environments (Jupyter, Vertex AI, SageMaker) are the primary exposure. Patch all TF deployments to 2.9.0, 2.8.1, 2.7.2, or 2.6.4 — no workaround exists.
Is CVE-2022-29197 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-29197, increasing the risk of exploitation.
How to fix CVE-2022-29197?
1. Patch: upgrade TensorFlow to ≥2.9.0, 2.8.1 (2.8.x branch), 2.7.2 (2.7.x branch), or 2.6.4 (2.6.x branch). No configuration workaround exists. 2. Restrict model execution: limit which users/services can submit arbitrary TF graphs — enforce allowlisted SavedModel signatures in serving. 3. Isolate training workers: run TF training jobs in sandboxed containers (gVisor, Firecracker) so a crash doesn't cascade. 4. Monitor for CHECK-failure crashes in TF logs (`tensorflow::errors::InvalidArgument`) as an anomaly signal. 5. Inventory: audit all TF versions across training, serving, and experimentation environments — notebook servers are frequently overlooked.
What systems are affected by CVE-2022-29197?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, shared notebook environments, model evaluation pipelines, ML CI/CD infrastructure.
What is the CVSS score for CVE-2022-29197?
CVE-2022-29197 has a CVSS v3.1 base score of 5.5 (MEDIUM). The EPSS exploitation probability is 0.06%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.UnsortedSegmentJoin` does not fully validate the input arguments. This results in a `CHECK`-failure which can be used to trigger a denial of service attack. The code assumes `num_segments` is a scalar but there is no validation for this before accessing its value. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
Exploitation Scenario
An attacker with access to a shared ML notebook environment (e.g., JupyterHub, Google Colab enterprise) crafts a minimal TF script calling `tf.raw_ops.UnsortedSegmentJoin` with a multi-dimensional tensor as `num_segments` instead of a scalar. When executed, TF's CHECK macro fires, triggering an abort/crash of the TF runtime process. In a shared Jupyter environment, this terminates other users' kernels. In an automated model evaluation pipeline that imports and runs user-submitted models, an adversary submits a poisoned SavedModel embedding this op call, crashing the evaluation worker and potentially delaying or disrupting model release pipelines.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/unsorted_segment_join_op.cc 3rd Party
- github.com/tensorflow/tensorflow/commit/13d38a07ce9143e044aa737cfd7bb759d0e9b400 Patch 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.6.4 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.7.2 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.8.1 Release 3rd Party
- github.com/tensorflow/tensorflow/releases/tag/v2.9.0 Release 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-hrg5-737c-2p56 Exploit Patch 3rd Party
- github.com/gclonly/im Exploit
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