CVE-2021-29573
Python vulnerability analysis and mitigation

Overview

A division by zero vulnerability was identified in TensorFlow's implementation of tf.raw_ops.MaxPoolGradWithArgmax function. The vulnerability, tracked as CVE-2021-29573, was discovered by Ying Wang and Yakun Zhang of Baidu X-Team and disclosed on May 13, 2021. The issue affects TensorFlow versions prior to 2.5.0, specifically impacting the pip packages tensorflow, tensorflow-cpu, and tensorflow-gpu (GitHub Advisory).

Technical details

The vulnerability occurs when the implementation fails to validate that the batch dimension of the tensor is non-zero before performing division operations. This can be triggered when processing empty tensors with specific shapes. A proof of concept involves using empty tensors with shape [0, 0, 0, 0] as input parameters to the MaxPoolGradWithArgmax operation (GitHub Advisory).

Impact

The vulnerability has been classified as Low severity. When exploited, it causes a division by zero error in the TensorFlow operations, potentially leading to program crashes or unexpected behavior (GitHub Advisory).

Exploitability

The vulnerability can be triggered through the tf.raw_ops.MaxPoolGradWithArgmax function by providing specific empty tensor inputs. A proof of concept exploit has been documented that demonstrates the issue using empty tensors with shape [0, 0, 0, 0] and specific parameters for ksize and strides (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in TensorFlow version 2.5.0 and backported to versions 2.4.2, 2.3.3, 2.2.3, and 2.1.4. The fix involves adding a check to prevent processing when the output tensor is null, implemented in commit 376c352a37ce5a68b721406dc7e77ac4b6cf483d (GitHub Advisory, GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59971CRITICAL10
  • Python logoPython
  • mysql-mcp-server
NoYesSep 11, 2026
CVE-2026-59177HIGH8.8
  • Python logoPython
  • esphome-device-builder
NoYesSep 09, 2026
CVE-2026-88006MEDIUM6.5
  • Python logoPython
  • open-webui
NoYesSep 10, 2026
CVE-2026-88005MEDIUM6.5
  • Python logoPython
  • open-webui
NoYesSep 10, 2026
CVE-2026-49836MEDIUM4.6
  • Python logoPython
  • psd-tools
NoYesSep 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management