CVE-2022-21735: TensorFlow FractionalMaxPool Division by 0

tensorflow-gpu Updated 02 Oct 2025

Summary

03/02/2022
Yes i
Unrated
Not published

CVE-2022-21735: Tensorflow is an Open Source Machine Learning Framework. Affects tensorflow-gpu across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 < ba4e8ac4dc2991e350d5cc407f8598c8d4ee70fb

Fixed in 2.5.3 or 2.6.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-21735 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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an open-source machine learning framework widely used for developing and deploying machine learning models. It provides a comprehensive set of tools and libraries for building and training neural networks. TensorFlow is available for multiple programming languages and platforms, including Python. The vulnerability described here affects the TensorFlow-GPU package, which is a version of TensorFlow optimized for GPU acceleration.

Vulnerability Detail

The vulnerability in TensorFlow-GPU arises from the implementation of the FractionalMaxPool function. This function can be manipulated in a way that causes a division by zero, leading to a crash of the TensorFlow process. An attacker could potentially exploit this vulnerability to disrupt machine learning processes or cause denial of service. The issue has been identified and fixed in TensorFlow versions 2.8.0, 2.7.1, 2.6.3, and 2.5.3.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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.5.3 2.5.3
    pip install --upgrade "tensorflow-gpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-gpu==2.6.3"

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

Workaround

As a workaround, if you are unable to immediately update to a fixed version, you can consider avoiding the usage of the FractionalMaxPool function in your TensorFlow-GPU code. By removing or replacing this function with an alternative, you can mitigate the risk of encountering the division by zero issue.

Conclusion

In conclusion, the vulnerability in TensorFlow-GPU's FractionalMaxPool function can be exploited to crash the TensorFlow process. It is crucial to update to the fixed versions or apply the provided workaround to mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for building and training neural networks.

TensorFlow-GPU is a version of TensorFlow optimized for GPU acceleration.

The vulnerability can lead to a crash of the TensorFlow process, potentially disrupting machine learning processes or causing denial of service.

You can fix this vulnerability by updating the TensorFlow-GPU package to one of the fixed versions: 2.8.0, 2.7.1, 2.6.3, or 2.5.3.

Yes, if you are unable to immediately update to a fixed version, you can avoid using the FractionalMaxPool function in your TensorFlow-GPU code.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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.5.3 2.5.3
    pip install --upgrade "tensorflow-gpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-gpu==2.6.3"

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