CVE-2022-35988: TensorFlow: GPU DoS via empty input to matrix_rank op
HIGH PoC AVAILABLEAny TensorFlow deployment exposing GPU-backed `matrix_rank` operations to external or untrusted inputs is vulnerable to a crash-loop DoS with a single malformed request. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workaround exists per the vendor advisory. If running TF Serving behind an API gateway, add tensor shape validation at the ingress layer as a compensating control while patching.
Risk Assessment
High severity (CVSS 7.5) with a favorable attacker profile: network-reachable, zero privileges, zero user interaction, low complexity. The CHECK-fail pattern in TensorFlow GPU kernels is a well-understood class of vulnerabilities with multiple prior instances in the same release cycle, making exploitation trivial for anyone familiar with TF's input validation gaps. Risk is highest for organizations running TF Serving or similar inference APIs with GPU backends exposed to untrusted callers; isolated training environments have substantially lower exposure.
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 (commit c55b476aa0e0bd4ee99d0f3ad18d9d706cd1260a).
-
No vendor-acknowledged workaround exists; patching is the only fix.
-
Compensating control: validate that input tensors to any linear algebra API call are non-empty before forwarding to the model — reject requests with zero-dimension tensors at the API gateway or application layer.
-
Detection: monitor TensorFlow server logs for
Check failedorCHECKassertion messages; repeated occurrences from a single source IP indicate active exploitation. -
If GPU compute is critical and patching is delayed, consider routing
matrix_rankoperations to CPU-only kernels as an emergency measure.
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-35988?
Any TensorFlow deployment exposing GPU-backed `matrix_rank` operations to external or untrusted inputs is vulnerable to a crash-loop DoS with a single malformed request. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2 — no workaround exists per the vendor advisory. If running TF Serving behind an API gateway, add tensor shape validation at the ingress layer as a compensating control while patching.
Is CVE-2022-35988 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-35988, increasing the risk of exploitation.
How to fix CVE-2022-35988?
1. Patch: upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit c55b476aa0e0bd4ee99d0f3ad18d9d706cd1260a). 2. No vendor-acknowledged workaround exists; patching is the only fix. 3. Compensating control: validate that input tensors to any linear algebra API call are non-empty before forwarding to the model — reject requests with zero-dimension tensors at the API gateway or application layer. 4. Detection: monitor TensorFlow server logs for `Check failed` or `CHECK` assertion messages; repeated occurrences from a single source IP indicate active exploitation. 5. If GPU compute is critical and patching is delayed, consider routing `matrix_rank` operations to CPU-only kernels as an emergency measure.
What systems are affected by CVE-2022-35988?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference APIs, training pipelines.
What is the CVSS score for CVE-2022-35988?
CVE-2022-35988 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. When `tf.linalg.matrix_rank` receives an empty input `a`, the GPU kernel gives a `CHECK` fail that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit c55b476aa0e0bd4ee99d0f3ad18d9d706cd1260a. 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 a TF Serving endpoint hosting a recommender or embedding model sends a POST request to the prediction API with a deliberately empty tensor payload (shape [0, 0] or similar) as input to any model pipeline that internally calls `tf.linalg.matrix_rank`. The GPU kernel raises an unhandled CHECK assertion, crashing the serving process. In a containerized deployment without automatic restart, this takes the service offline; with restart policies, the attacker can loop requests to maintain a persistent denial of service at negligible cost. No authentication token or ML knowledge is required — the attack requires only knowledge that the endpoint uses TensorFlow and accepts matrix-shaped 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