CVE-2021-29550
Python vulnerability analysis and mitigation

Overview

TensorFlow, an end-to-end open source platform for machine learning, was found to contain a vulnerability in the tf.raw_ops.FractionalAvgPool operation (CVE-2021-29550). The vulnerability was discovered and disclosed in May 2021, affecting TensorFlow versions prior to 2.5.0. The issue allows an attacker to trigger a runtime division by zero error, potentially leading to a denial of service condition (TF Advisory).

Technical details

The vulnerability stems from the implementation of FractionalAvgPool where a divisor quantity is computed by dividing two user-controlled values. The values input_size[i] and pooling_ratio_[i] are controlled via the value.shape() and pooling_ratio arguments. If input_size[i] is smaller than pooling_ratio_[i], the floor operation results in output_size[i] being 0. While there is a DCHECK_GT check, it is a no-op outside of debug mode. The issue manifests when these computed values are passed to GeneratePoolingSequence, where a division operation is performed without proper validation (TF Advisory).

Impact

When successfully exploited, this vulnerability can cause a runtime division by zero error, resulting in a denial of service condition. This could affect systems running TensorFlow applications that use the FractionalAvgPool operation (TF Advisory).

Exploitability

The vulnerability can be triggered by crafting specific inputs to the tf.raw_ops.FractionalAvgPool operation. A proof-of-concept exploit involves setting up a tensor with specific shape parameters and pooling ratios that lead to a division by zero condition (TF 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 are advised to upgrade to these patched versions. The fix involves adding validation checks to prevent pooling ratios from being bigger than input tensor dimensions (TF Patch).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Arch Linux

Fixed

rolling

tensorflow: 2.5.0-1

Fixed

SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66455CRITICAL9.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-63374CRITICAL9.3
  • Python logoPython
  • airflow-3
NoYesSep 18, 2026
CVE-2026-59163CRITICAL9.1
  • Python logoPython
  • mnemosyne-memory
NoYesSep 18, 2026
CVE-2026-33625HIGH8.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-64847MEDIUM6.8
  • Python logoPython
  • py3-anyio
NoYesSep 18, 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