CVE-2021-41209: TensorFlow Convolution Operators Division by 0 Vulnerability

tensorflow-cpu Updated 02 Oct 2025

Summary

05/11/2021
Yes i
Unrated
Not published

CVE-2021-41209: TensorFlow is an open source platform for machine learning. Affects tensorflow-cpu across 5 version ranges.

< 2.4.4 >= 2.5.0, < 2.5.2 >= 2.6.0, < 2.6.1 >= 2.7.0rc0, < 2.7.0 < f2c3931113eaafe9ef558faaddd48e00a6606235

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-41209 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow includes implementations for various operators, including convolution operators, which are commonly used in deep learning models for tasks like image recognition and natural language processing.

Vulnerability Detail

The vulnerability identified as CVE-2021-41209 affects TensorFlow versions prior to 2.7.0. It specifically impacts the implementations for convolution operators, which perform convolutions on input tensors using filter tensors. If empty filter tensor arguments are passed to these operators, a division by zero error is triggered. This vulnerability can be exploited by an attacker to cause a denial of service (DoS) condition or potentially execute arbitrary code.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.4.4 2.4.4
    pip install --upgrade "tensorflow-cpu==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow-cpu==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow-cpu==2.6.1"
  • >= 2.7.0rc0, < 2.7.0 2.7.0
    pip install --upgrade "tensorflow-cpu==2.7.0"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to apply the provided fix by upgrading to the patched versions of TensorFlow.

Conclusion

The TensorFlow Convolution Operators Division by 0 Vulnerability (CVE-2021-41209) is a critical vulnerability that affects TensorFlow versions prior to 2.7.0. It can lead to a denial of service (DoS) condition or potential code execution. Users are strongly advised to upgrade their TensorFlow installations to the patched versions to mitigate this vulnerability. For further support and assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning that provides tools and libraries for developing and deploying machine learning models.

Convolution operators in TensorFlow are implementations that perform convolutions on input tensors using filter tensors. They are commonly used in deep learning models for tasks like image recognition and natural language processing.

This vulnerability can be exploited by an attacker to cause a denial of service (DoS) condition or potentially execute arbitrary code.

To fix this vulnerability, you should upgrade your TensorFlow installation to version 2.7.0 or later. If you are on versions 2.6.1, 2.5.2, or 2.4.4, you should upgrade to the respective fixed versions.

There is no known workaround for this vulnerability. It is recommended to apply the provided fix by upgrading to the patched versions of TensorFlow.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.4.4 2.4.4
    pip install --upgrade "tensorflow-cpu==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow-cpu==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow-cpu==2.6.1"
  • >= 2.7.0rc0, < 2.7.0 2.7.0
    pip install --upgrade "tensorflow-cpu==2.7.0"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback