CVE-2022-21725: TensorFlow GPU - Division by 0 in Convolution Operations

tensorflow-gpu Updated 02 Oct 2025

Summary

03/02/2022
Yes i
Unrated
Not published

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

< 2.5.3 >= 2.6.0, < 2.6.3 < 3218043d6d3a019756607643cf65574fbfef5d7a

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-21725 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 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 GPU is a variant of TensorFlow that leverages the power of GPUs for accelerated computation. It allows users to perform high-performance deep learning tasks on GPU-enabled systems.

Vulnerability Detail

The vulnerability (CVE-2022-21725) in TensorFlow GPU arises from a flaw in the estimator for the cost of certain convolution operations. The function responsible for estimating the cost fails to validate the stride argument, which can lead to a division by zero error. An attacker could potentially exploit this vulnerability to cause a denial of service (DoS) condition or execute arbitrary code. The impact of this vulnerability depends on the context in which TensorFlow GPU is used and the availability of mitigating controls.

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

There is no specific workaround provided for this vulnerability. However, users can mitigate the risk by ensuring they update their TensorFlow GPU installations to one of the fixed versions as mentioned in the 'how_to_fix' section.

Conclusion

The vulnerability in TensorFlow GPU (CVE-2022-21725) allows for a division by zero error in certain convolution operations. This can potentially lead to a denial of service (DoS) condition or arbitrary code execution. To mitigate the vulnerability, users should update their TensorFlow GPU installations to one of the fixed versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tensorflow-gpu →

Share this vulnerability

FAQ

TensorFlow GPU is a variant of TensorFlow that utilizes GPUs for accelerated computation, enabling high-performance deep learning tasks.

The impact of this vulnerability depends on the context in which TensorFlow GPU is used and the availability of mitigating controls. It could potentially lead to a denial of service (DoS) condition or arbitrary code execution.

To fix this vulnerability, update your TensorFlow GPU installation to one of the fixed versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3.

There is no specific workaround provided for this vulnerability. However, updating to one of the fixed versions mentioned in the 'how_to_fix' section will mitigate the risk.

You can find more information about this vulnerability in the official TensorFlow documentation, security advisories, or the CVE entry (CVE-2022-21725).

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