CVE-2021-29525
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to contain a division by zero vulnerability (CVE-2021-29525) in the tf.raw_ops.Conv2DBackpropInput operation. The vulnerability was discovered and disclosed on May 14, 2021, affecting all versions prior to 2.5.0. The issue impacts multiple versions of TensorFlow including versions up to 2.1.4, 2.2.0-2.2.3, 2.3.0-2.3.3, and 2.4.0-2.4.2 (NVD).

Technical details

The vulnerability exists in the implementation of Conv2DBackpropInput where a division operation is performed using a quantity that is controlled by the caller. The issue occurs in the core/kernels/conv_grad_input_ops.h file where the code performs division without proper validation of the divisor. The vulnerability has been assigned a CVSS v3.1 base score of 7.8 (HIGH) by NIST NVD, while GitHub's assessment rates it as LOW with a score of 2.5 (NVD).

Impact

If successfully exploited, an attacker can trigger a division by zero error by providing specially crafted input to the tf.raw_ops.Conv2DBackpropInput operation. This can lead to program crashes and potential denial of service conditions (GitHub Advisory).

Exploitability

The vulnerability can be exploited by passing specific parameters to tf.raw_ops.Conv2DBackpropInput. A proof of concept exists that demonstrates the vulnerability by using input tensors with carefully chosen shapes that trigger the division by zero condition. The exploit was initially reported by Yakun Zhang and Ying Wang of Baidu X-Team (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in TensorFlow version 2.5.0. The fix has also been backported to versions 2.4.2, 2.3.3, 2.2.3, and 2.1.4. Users are advised to upgrade to these patched versions. The fix involves adding proper validation to ensure the work_unit_size is greater than 0 before performing the division operation (TensorFlow 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-84366HIGH7.4
  • Python logoPython
  • scrapy
NoYesSep 01, 2026
CVE-2026-53720MEDIUM5.1
  • Python logoPython
  • pymonocypher
NoYesSep 03, 2026
CVE-2026-84311MEDIUM4.8
  • Python logoPython
  • pypdf
NoYesSep 01, 2026
CVE-2026-84310MEDIUM4.8
  • Python logoPython
  • pypdf
NoYesSep 01, 2026
GHSA-wwv5-g3v4-889xLOW2.3
  • Python logoPython
  • tornado
NoYesSep 01, 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