CVE-2022-35963: TensorFlow: DoS via FractionalAvgPoolGrad overflow
HIGHPoC 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.
What is the risk?
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.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| TensorFlow | pip | — | No patch |
Do you use TensorFlow? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 stepsPatch: 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.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
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.48%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0001Search Open AI Vulnerability AnalysisAML.T0029Denial of AI ServiceAML.T0049Exploit Public-Facing ApplicationCompliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-617 — Reachable Assertion: The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
- [Implementation] If the assertion statement is required (e.g., for security or reliability), change the invoking code to avoid the conditions that trigger the assertion.
- [Implementation] Consider changing the assertion to some other less "fatal" error. This might not be easy to implement, since other code may be needed to handle the error.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
Timeline
Related Vulnerabilities
CVE-2026-189489.9Feast: insecure UDF deserialization enables RCE
Same package: tensorflowCVE-2020-151969.9TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflowCVE-2020-152059.8TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflowCVE-2019-167789.8TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflowCVE-2020-152089.8TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow