CVE-2022-35991: TensorFlow: DoS via TensorListScatter CHECK fail
HIGH PoC AVAILABLEAny TensorFlow deployment exposing inference endpoints to untrusted network inputs is vulnerable to process crash via a single malformed tensor shape. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workarounds exist. Priority is high for externally-facing ML serving infrastructure; internal-only deployments carry lower but non-zero risk.
Risk Assessment
CVSS 7.5 High with AV:N/AC:L/PR:N/UI:N makes this trivially exploitable from the network with no authentication. Impact is limited to availability (A:H), with no confidentiality or integrity compromise. The attack requires only a single malformed request, making automated exploitation or enumeration-based DoS campaigns realistic. Risk is elevated for organizations running TensorFlow Serving or custom inference APIs exposed to the internet or multi-tenant 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 to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — apply the commit bb03fdf4aae944ab2e4b35c7daa051068a8b7f61.
-
Input validation: Add shape validation middleware that rejects element_shape tensors with rank > 1 before they reach TF ops.
-
Process isolation: Run TF Serving workers in isolated containers/processes with automatic restart (e.g., Kubernetes restartPolicy) to limit blast radius.
-
Network controls: Restrict direct tensor input endpoints to authenticated, authorized callers only.
-
Detection: Monitor for abrupt process exits or elevated restart rates on inference workers as an indicator of exploitation attempts.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2022-35991?
Any TensorFlow deployment exposing inference endpoints to untrusted network inputs is vulnerable to process crash via a single malformed tensor shape. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workarounds exist. Priority is high for externally-facing ML serving infrastructure; internal-only deployments carry lower but non-zero risk.
Is CVE-2022-35991 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-35991, increasing the risk of exploitation.
How to fix CVE-2022-35991?
1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — apply the commit bb03fdf4aae944ab2e4b35c7daa051068a8b7f61. 2. Input validation: Add shape validation middleware that rejects element_shape tensors with rank > 1 before they reach TF ops. 3. Process isolation: Run TF Serving workers in isolated containers/processes with automatic restart (e.g., Kubernetes restartPolicy) to limit blast radius. 4. Network controls: Restrict direct tensor input endpoints to authenticated, authorized callers only. 5. Detection: Monitor for abrupt process exits or elevated restart rates on inference workers as an indicator of exploitation attempts.
What systems are affected by CVE-2022-35991?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference APIs, training pipelines.
What is the CVSS score for CVE-2022-35991?
CVE-2022-35991 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.15%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. When `TensorListScatter` and `TensorListScatterV2` receive an `element_shape` of a rank greater than one, they give a `CHECK` fail that can trigger a denial of service attack. We have patched the issue in GitHub commit bb03fdf4aae944ab2e4b35c7daa051068a8b7f61. 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 targeting an organization's public-facing ML API (e.g., a fraud detection or recommendation model served via TensorFlow Serving) crafts a POST request with a tensor payload where element_shape has rank 2 or higher. When TensorListScatter processes this input, the internal CHECK assertion fires, triggering a C++ abort that crashes the TF process. Repeated at low frequency, this sustains a DoS condition against the inference tier. In a Kubernetes deployment without proper liveness probes, this can cause extended service degradation. No ML expertise required — the attack is equivalent to sending a malformed HTTP request to a web server.
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