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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
TensorFlow pip No patch
195.8K OpenSSF 7.1 3.7K dependents Pushed 2d ago 4% patched ~1372d to patch Full package profile →

Do you use TensorFlow? You're affected.

How severe is it?

CVSS 3.1
6.5 / 10
EPSS
0.8%
chance of exploitation in 30 days
Higher than 51% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

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.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

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:

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.77%.

What is the AI security impact?

Affected AI Architectures

model servinginferencetraining pipelines

MITRE ATLAS Techniques

AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: 8.4
NIST AI RMF: RV 2.2

What are the technical details?

Original Advisory

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)

CWE-369 — Divide By Zero: The product divides a value by zero.

Source: MITRE CWE corpus.

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