CVE-2022-35998: TensorFlow: DoS via EmptyTensorList CHECK fail
HIGH PoC AVAILABLEAny TensorFlow inference service exposing ops that accept user-controlled tensor shapes is vulnerable to unauthenticated remote crash — no credentials needed, low complexity. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; there are no workarounds. Audit your model serving endpoints for exposed TF runtime access, particularly in shared inference platforms.
Risk Assessment
High severity (CVSS 7.5) with network-accessible, zero-auth, low-complexity exploitation. The CHECK fail causes process termination, which in production model-serving contexts means full availability loss. Risk is elevated in multi-tenant inference platforms where adversaries can craft inference payloads. Not in CISA KEV and no confirmed exploitation in the wild, but the attack surface is broad — any TF serving deployment on supported versions 2.7.x–2.9.x is exposed.
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 immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (cherry-picked fix per advisory).
-
No official workaround exists — patching is the only remediation.
-
As defense-in-depth: validate and reject multi-dimensional element_shape inputs at API gateway or input preprocessing layers before they reach TF runtime.
-
Deploy model serving behind authentication even for 'internal' endpoints to limit the unauthenticated attack surface.
-
Monitor for abnormal process restarts or crash loops in TF Serving containers as a detection signal.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-35998?
Any TensorFlow inference service exposing ops that accept user-controlled tensor shapes is vulnerable to unauthenticated remote crash — no credentials needed, low complexity. Patch to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 immediately; there are no workarounds. Audit your model serving endpoints for exposed TF runtime access, particularly in shared inference platforms.
Is CVE-2022-35998 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-35998, increasing the risk of exploitation.
How to fix CVE-2022-35998?
1. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (cherry-picked fix per advisory). 2. No official workaround exists — patching is the only remediation. 3. As defense-in-depth: validate and reject multi-dimensional element_shape inputs at API gateway or input preprocessing layers before they reach TF runtime. 4. Deploy model serving behind authentication even for 'internal' endpoints to limit the unauthenticated attack surface. 5. Monitor for abnormal process restarts or crash loops in TF Serving containers as a detection signal.
What systems are affected by CVE-2022-35998?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference endpoints, training pipelines, notebook environments.
What is the CVSS score for CVE-2022-35998?
CVE-2022-35998 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.07%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. If `EmptyTensorList` receives an input `element_shape` with more than one dimension, it gives a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit c8ba76d48567aed347508e0552a257641931024d. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.
Exploitation Scenario
An adversary identifies a publicly accessible TensorFlow Serving endpoint or ML inference API. They craft a request that triggers the EmptyTensorList operation with a multi-dimensional element_shape tensor (e.g., shape [2,2] instead of scalar or 1D). The TF runtime hits an internal CHECK assertion, aborts the process, and the inference service crashes. In containerized deployments without auto-restart, this results in extended downtime. In auto-restarting environments, the attacker can loop requests to maintain continuous denial of service. No ML knowledge is required — the attacker only needs to know the endpoint accepts TF-compatible inputs.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
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