CVE-2022-29198: TensorFlow: DoS via sparse tensor input validation failure
MEDIUM PoC AVAILABLE CISA: TRACK*This medium-severity DoS in TensorFlow crashes the runtime via malformed sparse tensor inputs—no RCE, no data leakage. Risk is real in shared ML environments (Jupyter clusters, multi-tenant GPU nodes) where low-privileged users can submit crafted inputs. Patch to TF 2.9.0/2.8.1/2.7.2/2.6.4 at next maintenance window; no emergency action required.
Risk Assessment
CVSS 5.5 Medium with local attack vector and low privilege requirement limits blast radius. Exploitation requires access to the TF runtime, which in practice means shared notebooks, Kubeflow pipelines, or on-prem GPU clusters with multi-user access. No evidence of active exploitation and not in CISA KEV. Severity elevates in high-availability inference environments where process crashes affect SLAs, but remains low-priority compared to RCE or data exposure vectors.
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-
Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4.
-
If immediate patching is not possible, validate that dense_shape is rank-1 and indices is rank-2 before calling SparseTensorToCSRSparseMatrix at the application layer.
-
In shared environments, restrict which users can submit raw ops to the TF runtime.
-
For inference services, add input shape validation at the API gateway before tensors reach TF.
-
Monitor for unexpected TF process crashes—repeated CHECK-failure crashes with user-controlled inputs indicate active exploitation attempts.
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-29198?
This medium-severity DoS in TensorFlow crashes the runtime via malformed sparse tensor inputs—no RCE, no data leakage. Risk is real in shared ML environments (Jupyter clusters, multi-tenant GPU nodes) where low-privileged users can submit crafted inputs. Patch to TF 2.9.0/2.8.1/2.7.2/2.6.4 at next maintenance window; no emergency action required.
Is CVE-2022-29198 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-29198, increasing the risk of exploitation.
How to fix CVE-2022-29198?
1. Upgrade TensorFlow to 2.9.0, 2.8.1, 2.7.2, or 2.6.4. 2. If immediate patching is not possible, validate that dense_shape is rank-1 and indices is rank-2 before calling SparseTensorToCSRSparseMatrix at the application layer. 3. In shared environments, restrict which users can submit raw ops to the TF runtime. 4. For inference services, add input shape validation at the API gateway before tensors reach TF. 5. Monitor for unexpected TF process crashes—repeated CHECK-failure crashes with user-controlled inputs indicate active exploitation attempts.
What systems are affected by CVE-2022-29198?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, inference, shared ML platforms.
What is the CVSS score for CVE-2022-29198?
CVE-2022-29198 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.SparseTensorToCSRSparseMatrix` 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 `dense_shape` is a vector and `indices` is a matrix (as part of requirements for sparse tensors) but there is no validation for this. 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 Jupyter Hub instance or Kubeflow pipeline crafts a SparseTensor where dense_shape is a matrix instead of a vector, or indices is a vector instead of a matrix. Passing this to tf.raw_ops.SparseTensorToCSRSparseMatrix triggers an unchecked assertion failure, crashing the TF process. In a multi-tenant ML platform, this disrupts other users' training jobs sharing the same runtime. In an inference API exposing sparse tensor endpoints, repeated calls constitute a targeted availability attack without rate limiting.
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/sparse/sparse_tensor_to_csr_sparse_matrix_op.cc 3rd Party
- github.com/tensorflow/tensorflow/commit/ea50a40e84f6bff15a0912728e35b657548cef11 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-mg66-qvc5-rm93 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