CVE-2022-41898: TensorFlow: DoS crash via empty SparseFillEmptyRowsGrad inputs
HIGH PoC AVAILABLE CISA: TRACK*A network-reachable denial-of-service in TensorFlow allows any unauthenticated attacker to crash inference or training services by submitting empty sparse tensor inputs. If you expose TensorFlow Serving endpoints or accept user-controlled tensor inputs, patch immediately to TF 2.11, 2.10.1, 2.9.3, or 2.8.4. No workaround beyond input sanitization at the application layer—upgrade is the only reliable fix.
Risk Assessment
High. CVSS 7.5 reflects the trivial exploitability: network-accessible, no authentication, no user interaction required. Impact is purely availability (complete process crash), which translates to full service outage for ML inference endpoints. EPSS data unavailable but the attack surface is broad—any TF deployment accepting external sparse tensor data is exposed. Not in CISA KEV and no known active exploitation, which tempers urgency slightly, but the low barrier to exploitation means opportunistic attacks are realistic.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
1 step-
1) PATCH: Upgrade to TensorFlow 2.11.0, 2.10.1, 2.9.3, or 2.8.4—all contain the fix (commit af4a6a3). 2) VALIDATE INPUTS: Add pre-processing validation to reject empty sparse tensors before they reach SparseFillEmptyRowsGrad; check that
empty_row_indicatorand related tensors are non-empty at application boundaries. 3) ISOLATE: Run TF Serving instances in containers with restart policies so crashes auto-recover and don't cascade. 4) MONITOR: Alert on unexpected TF process exits or serving health check failures—these may indicate active exploitation attempts. 5) NETWORK CONTROLS: If TF Serving is not required to be public-facing, restrict access to internal networks or authenticated clients only.
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-41898?
A network-reachable denial-of-service in TensorFlow allows any unauthenticated attacker to crash inference or training services by submitting empty sparse tensor inputs. If you expose TensorFlow Serving endpoints or accept user-controlled tensor inputs, patch immediately to TF 2.11, 2.10.1, 2.9.3, or 2.8.4. No workaround beyond input sanitization at the application layer—upgrade is the only reliable fix.
Is CVE-2022-41898 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-41898, increasing the risk of exploitation.
How to fix CVE-2022-41898?
1) PATCH: Upgrade to TensorFlow 2.11.0, 2.10.1, 2.9.3, or 2.8.4—all contain the fix (commit af4a6a3). 2) VALIDATE INPUTS: Add pre-processing validation to reject empty sparse tensors before they reach SparseFillEmptyRowsGrad; check that `empty_row_indicator` and related tensors are non-empty at application boundaries. 3) ISOLATE: Run TF Serving instances in containers with restart policies so crashes auto-recover and don't cascade. 4) MONITOR: Alert on unexpected TF process exits or serving health check failures—these may indicate active exploitation attempts. 5) NETWORK CONTROLS: If TF Serving is not required to be public-facing, restrict access to internal networks or authenticated clients only.
What systems are affected by CVE-2022-41898?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference APIs, recommendation systems.
What is the CVSS score for CVE-2022-41898?
CVE-2022-41898 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.18%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. If `SparseFillEmptyRowsGrad` is given empty inputs, TensorFlow will crash. We have patched the issue in GitHub commit af4a6a3c8b95022c351edae94560acc61253a1b8. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.
Exploitation Scenario
An adversary identifies a public-facing model inference API (e.g., TensorFlow Serving REST endpoint) through active scanning or public documentation. They craft a POST request containing a sparse tensor payload with empty `SparseFillEmptyRowsGrad` inputs—a trivial manipulation requiring no ML expertise, just knowledge of TF's sparse tensor API format. Upon submission, the TF serving process crashes immediately. The attacker repeats this in a loop to maintain a persistent denial-of-service condition, preventing legitimate users from accessing the model. In a SaaS context, this translates to platform-wide outage until the service is restarted and patched.
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/master/tensorflow/core/kernels/sparse_fill_empty_rows_op_gpu.cu.cc 3rd Party
- github.com/tensorflow/tensorflow/commit/af4a6a3c8b95022c351edae94560acc61253a1b8 Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-hq7g-wwwp-q46h Exploit 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