CVE-2022-21735: TensorFlow: DoS via FractionalMaxPool div-by-zero
MEDIUM PoC AVAILABLE CISA: TRACK*A low-privileged remote attacker can crash TensorFlow inference processes by sending crafted inputs that trigger a division by zero in FractionalMaxPool. If your ML serving infrastructure exposes TensorFlow endpoints over the network, this is a practical availability threat with no exploit complexity barrier. Patch to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately.
Risk Assessment
Medium severity but operationally significant for ML serving environments. Network-exploitable with low complexity and only low-privilege access means the attack surface is broad. No confidentiality or integrity impact, but process termination of an inference server causes full service interruption — especially disruptive in unattended or high-availability serving setups without automated recovery.
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-
Upgrade TensorFlow to 2.8.0, 2.7.1, 2.6.3, or 2.5.3 (official backports available).
-
If immediate upgrade is blocked, add input validation to reject tensor dimensions that produce zero-value pooling parameters.
-
Deploy process supervisors (systemd, Docker restart policies, Kubernetes liveness probes) to auto-restart crashed inference processes.
-
Restrict network access to TF serving APIs to authenticated, trusted callers only — do not expose raw inference APIs to the public internet.
-
Monitor for unexpected process terminations in inference infrastructure as a detection signal.
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-21735?
A low-privileged remote attacker can crash TensorFlow inference processes by sending crafted inputs that trigger a division by zero in FractionalMaxPool. If your ML serving infrastructure exposes TensorFlow endpoints over the network, this is a practical availability threat with no exploit complexity barrier. Patch to TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3 immediately.
Is CVE-2022-21735 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2022-21735, increasing the risk of exploitation.
How to fix CVE-2022-21735?
1. Upgrade TensorFlow to 2.8.0, 2.7.1, 2.6.3, or 2.5.3 (official backports available). 2. If immediate upgrade is blocked, add input validation to reject tensor dimensions that produce zero-value pooling parameters. 3. Deploy process supervisors (systemd, Docker restart policies, Kubernetes liveness probes) to auto-restart crashed inference processes. 4. Restrict network access to TF serving APIs to authenticated, trusted callers only — do not expose raw inference APIs to the public internet. 5. Monitor for unexpected process terminations in inference infrastructure as a detection signal.
What systems are affected by CVE-2022-21735?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference, training pipelines.
What is the CVSS score for CVE-2022-21735?
CVE-2022-21735 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.22%.
Technical Details
NVD Description
Tensorflow is an Open Source Machine Learning Framework. The implementation of `FractionalMaxPool` can be made to crash a TensorFlow process via a division by 0. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
Exploitation Scenario
An attacker with API access to a TensorFlow-based model serving endpoint submits a crafted inference request with tensor dimensions that trigger FractionalMaxPool with parameters causing a division by zero. No ML expertise is required — the attacker discovers the endpoint accepts FractionalMaxPool-backed model inputs and crafts a malformed tensor. The TF process crashes, taking down inference for all consumers sharing that server. In high-throughput serving setups without auto-recovery, this yields sustained outage with minimal attacker effort and repeatability.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H References
- github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/fractional_max_pool_op.cc Exploit 3rd Party
- github.com/tensorflow/tensorflow/commit/ba4e8ac4dc2991e350d5cc407f8598c8d4ee70fb Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-87v6-crgm-2gfj Patch 3rd Party
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