CVE-2022-35963: TensorFlow: DoS via FractionalAvgPoolGrad overflow
HIGH PoC AVAILABLEAny TensorFlow deployment (2.7.x–2.9.x) exposing model inference endpoints is vulnerable to unauthenticated remote crashes via malformed tensor shapes — no privileges or user interaction required. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2; there are no workarounds. If patching is delayed, enforce strict input shape validation at the API gateway layer before requests reach TensorFlow ops.
Risk Assessment
High operational risk for AI inference infrastructure. CVSS 7.5 reflects network-accessible, zero-auth, low-complexity exploitation with full availability impact. The attack surface is broad — any model using FractionalAvgPool layers (common in image classification architectures) served over an HTTP/gRPC endpoint is reachable. No confidentiality or integrity impact limits blast radius to service availability, but crashing ML serving infrastructure can be high-impact in production AI pipelines.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit 03a659d7).
-
No workaround exists per vendor advisory.
-
Compensating control: Enforce tensor shape bounds validation at API ingress (max dimensions, max element counts) before forwarding to TF runtime.
-
Harden serving layer: Configure TF Serving with process auto-restart and health-check probes to minimize recovery time if exploited.
-
Audit: Identify all models in your registry using FractionalAvgPool/FractionalAvgPoolGrad layers — prioritize those exposed to external or untrusted input sources.
-
Monitor: Alert on abnormal CHECK failure crashes or OOM signals in TF Serving logs.
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-35963?
Any TensorFlow deployment (2.7.x–2.9.x) exposing model inference endpoints is vulnerable to unauthenticated remote crashes via malformed tensor shapes — no privileges or user interaction required. Patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2; there are no workarounds. If patching is delayed, enforce strict input shape validation at the API gateway layer before requests reach TensorFlow ops.
Is CVE-2022-35963 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-35963, increasing the risk of exploitation.
How to fix CVE-2022-35963?
1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (commit 03a659d7). 2. No workaround exists per vendor advisory. 3. Compensating control: Enforce tensor shape bounds validation at API ingress (max dimensions, max element counts) before forwarding to TF runtime. 4. Harden serving layer: Configure TF Serving with process auto-restart and health-check probes to minimize recovery time if exploited. 5. Audit: Identify all models in your registry using FractionalAvgPool/FractionalAvgPoolGrad layers — prioritize those exposed to external or untrusted input sources. 6. Monitor: Alert on abnormal CHECK failure crashes or OOM signals in TF Serving logs.
What systems are affected by CVE-2022-35963?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference endpoints, batch inference pipelines.
What is the CVSS score for CVE-2022-35963?
CVE-2022-35963 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.06%.
Technical Details
NVD Description
TensorFlow is an open source platform for machine learning. The implementation of `FractionalAvgPoolGrad` does not fully validate the input `orig_input_tensor_shape`. This results in an overflow that results in a `CHECK` failure which can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 03a659d7be9a1154fdf5eeac221e5950fec07dad. 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 attacker identifies a public-facing model inference API powered by TensorFlow Serving. The deployed model (e.g., an image classifier using FractionalAvgPool for spatial downsampling) accepts user-supplied image tensors. The attacker crafts a POST request to the /v1/models/:model/versions/:version:predict endpoint with a malformed orig_input_tensor_shape that causes an integer overflow in FractionalAvgPoolGrad during backpropagation or gradient computation. The overflow triggers an internal CHECK assertion failure, crashing the TF Serving process. With no restart policy in place, the model endpoint becomes unavailable. In a serverless or Kubernetes environment without liveness probes, this becomes a sustained outage. The attack requires only knowledge of the endpoint URL and HTTP access — no authentication or ML expertise needed.
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