CVE-2022-21735: TensorFlow: DoS via FractionalMaxPool div-by-zero

MEDIUM PoC AVAILABLE CISA: TRACK*
Published February 3, 2022
CISO Take

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
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
6.5 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 44% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Unchanged
C None
I None
A High

Recommended Action

5 steps
  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.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 15 - Accuracy, robustness and cybersecurity
ISO 42001
8.4 - AI system operation and monitoring
NIST AI RMF
RV 2.2 - Evaluate AI system robustness and resilience

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.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
February 3, 2022
Last Modified
May 5, 2025
First Seen
February 3, 2022

Related Vulnerabilities