CVE-2021-29522
Python vulnerability analysis and mitigation

Overview

TensorFlow's tf.raw_ops.Conv3DBackprop* operations contained a vulnerability (CVE-2021-29522) where they failed to validate that input tensors are not empty, potentially resulting in a division by zero error. The vulnerability was discovered in May 2021 and affected TensorFlow versions prior to 2.5.0 (GitHub Advisory).

Technical details

The vulnerability exists in the implementation where the code does not check that the divisor used in computing the shard size is not zero. The issue occurs in the calculation of shard_size where work_unit_size could be zero: const size_t shard_size = use_parallel_contraction ? 1 : (target_working_set_size + work_unit_size - 1) / work_unit_size. An attacker could trigger this by providing empty input tensors to the Conv3DBackprop operations (GitHub Advisory).

Impact

If successfully exploited, an attacker who controls the input sizes could trigger a denial of service via a division by zero error. This could affect the availability of systems using the vulnerable TensorFlow versions (GitHub Advisory).

Exploitability

The vulnerability can be exploited by crafting specific input tensors with empty shapes. Example exploit code involves using tf.raw_ops.Conv3DBackpropInputV2 or tf.raw_ops.Conv3DBackpropFilterV2 with specifically crafted empty tensors (GitHub Advisory).

Mitigation and workarounds

The issue was patched in TensorFlow 2.5.0. The fix was also backported to TensorFlow versions 2.4.2, 2.3.3, 2.2.3, and 2.1.4. Users should upgrade to these patched versions. The fix involves adding validation checks for empty tensors, as implemented in commit 311403edbc9816df80274bd1ea8b3c0c0f22c3fa (GitHub Advisory).

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