CVE-2022-23557: Division by Zero Vulnerability in tensorflow-gpu

tensorflow-gpu Updated 02 Oct 2025

Summary

04/02/2022
Yes i
Unrated
Not published

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

< 2.5.3 >= 2.6.0, < 2.6.3 < 8c6f391a2282684a25cbfec7687bd5d35261a209

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-23557 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 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 that provides a wide range of tools and libraries for building and deploying machine learning models. It is widely used in various domains, including computer vision, natural language processing, and deep learning. The tensorflow-gpu package is a PyPI distribution of TensorFlow specifically optimized for GPU acceleration. It allows users to leverage the power of GPUs to accelerate their machine learning workflows.

Vulnerability Detail

This vulnerability (CVE-2022-23557) exists in the tensorflow-gpu package and is caused by a lack of validation in the BiasAndClamp implementation. An attacker can exploit this vulnerability by crafting a TFLite model that triggers a division by zero when the bias_size parameter is zero. The lack of a check for non-zero bias_size allows the attacker to cause a division by zero error, potentially leading to a denial of service (DoS) or other unexpected behavior. The vulnerability affects versions 0.0.0 to 2.5.3, 2.6.0 to 2.6.3, and 2.7.1 of 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 →

Workaround

As a temporary workaround, users can avoid the vulnerability by ensuring that the bias_size parameter in the TFLite model is always set to a non-zero value. This can be achieved by validating the input data and ensuring that the bias_size parameter is properly initialized before passing it to the BiasAndClamp implementation.

Conclusion

In conclusion, the tensorflow-gpu package is vulnerable to a division by zero vulnerability in the BiasAndClamp implementation. This vulnerability can be exploited by crafting a malicious TFLite model. The TensorFlow team has addressed this vulnerability in the upcoming release and has also backported the fix to older versions. Users are advised to upgrade their tensorflow-gpu package to a fixed version to mitigate the risk. For further support on 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 that provides tools and libraries for building and deploying machine learning models.

The tensorflow-gpu package is a PyPI distribution of TensorFlow specifically optimized for GPU acceleration.

This vulnerability can be exploited by an attacker to trigger a division by zero error, potentially leading to a denial of service or other unexpected behavior.

Versions 0.0.0 to 2.5.3, 2.6.0 to 2.6.3, and 2.7.1 of tensorflow-gpu are affected by this vulnerability.

To fix this vulnerability, users are advised to upgrade their tensorflow-gpu package to one of the fixed versions: TensorFlow 2.8.0, 2.7.1, 2.6.3, or 2.5.3.

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