CVE-2022-35959: TensorFlow: DoS via AvgPool3DGradOp input overflow
HIGH PoC AVAILABLEA network-accessible denial-of-service flaw in TensorFlow's 3D pooling gradient operator lets unauthenticated attackers crash ML serving endpoints with a single crafted request. Any production TF deployment accepting user-controlled tensor shapes is at risk. No workarounds exist — patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2.
Risk Assessment
High severity (CVSS 7.5) with a trivially exploitable, zero-auth, network-accessible attack path. The overflow-to-CHECK-failure chain requires no ML expertise — just a malformed API call. Impact is strictly availability (DoS); no data exfiltration or code execution surface exists. Risk is concentrated in TensorFlow Serving deployments exposed to untrusted networks or multi-tenant inference APIs. Not in CISA KEV and no active exploitation reported, but the AC:L/PR:N/UI:N vector justifies immediate patching over deferred scheduling.
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 (fix in commit 9178ac9d).
-
Input validation: Enforce strict tensor shape schema validation at the API gateway before requests reach the model — reject shapes outside expected bounds, especially for orig_input_shape parameters.
-
Rate limiting: Apply per-client rate limits on inference endpoints to reduce sustained DoS impact.
-
Detection: Alert on unexpected TF Serving process crashes or CHECK failure log entries (grep for 'Check failed' in TF logs).
-
Network segmentation: Do not expose TF Serving directly to the public internet — require authenticated, authorized access to all inference endpoints.
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-35959?
A network-accessible denial-of-service flaw in TensorFlow's 3D pooling gradient operator lets unauthenticated attackers crash ML serving endpoints with a single crafted request. Any production TF deployment accepting user-controlled tensor shapes is at risk. No workarounds exist — patch immediately to TF 2.10.0, 2.9.1, 2.8.1, or 2.7.2.
Is CVE-2022-35959 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-35959, increasing the risk of exploitation.
How to fix CVE-2022-35959?
1. Patch: Upgrade to TensorFlow 2.10.0, 2.9.1, 2.8.1, or 2.7.2 (fix in commit 9178ac9d). 2. Input validation: Enforce strict tensor shape schema validation at the API gateway before requests reach the model — reject shapes outside expected bounds, especially for orig_input_shape parameters. 3. Rate limiting: Apply per-client rate limits on inference endpoints to reduce sustained DoS impact. 4. Detection: Alert on unexpected TF Serving process crashes or CHECK failure log entries (grep for 'Check failed' in TF logs). 5. Network segmentation: Do not expose TF Serving directly to the public internet — require authenticated, authorized access to all inference endpoints.
What systems are affected by CVE-2022-35959?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference.
What is the CVSS score for CVE-2022-35959?
CVE-2022-35959 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 `AvgPool3DGradOp` does not fully validate the input `orig_input_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 9178ac9d6389bdc54638ab913ea0e419234d14eb. 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 TF Serving endpoint running a video classification or 3D medical imaging model containing AvgPool3D layers. They submit a gRPC or HTTP inference request with an intentionally malformed orig_input_shape — e.g., an extremely large, zero, or negative tensor dimension — crafted to trigger an integer overflow in AvgPool3DGradOp. The overflow causes a CHECK assertion failure, immediately crashing the TF Serving process. With no authentication required and reproducible results, the adversary can script repeated requests to maintain persistent service disruption, effectively taking down model inference for all downstream applications and users sharing the endpoint.
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