CVE-2022-23576: TensorFlow Integer Overflow Vulnerability

tensorflow Updated 18 Jul 2026

Summary

09/07/2026
Yes i
High
6.5

CVE-2022-23576: Integer overflow in Tensorflow. Affects tensorflow across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 >= 2.7.0, < 2.7.1

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

Also tracked for

The same CVE-2022-23576 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 library developed by Google. It is widely used for building and training machine learning models, offering a flexible architecture that allows deployment across various platforms. TensorFlow's capabilities include deep learning, neural networks, and data flow programming. However, it is susceptible to vulnerabilities, such as the integer overflow issue identified in the OpLevelCostEstimator component, which can lead to potential exploitation if not addressed.

Vulnerability Detail

The vulnerability arises from the implementation of the CalculateOutputSize function in TensorFlow's OpLevelCostEstimator. This function is susceptible to integer overflow when processing tensors with a large number of elements. Specifically, the multiplication of dimensions in the output shape can exceed the maximum value representable by the integer type, leading to unexpected behavior or crashes. Attackers could exploit this vulnerability by crafting operations that trigger the overflow, potentially compromising the stability and security of applications using TensorFlow.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

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

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

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to update to the patched versions of TensorFlow as soon as possible.

Conclusion

The integer overflow vulnerability in TensorFlow (CVE-2022-23576) poses a significant risk to applications utilizing this library. It is essential to update to the patched versions to ensure the security and stability of your machine learning models. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-23576 is a vulnerability in TensorFlow that allows for integer overflow in the CalculateOutputSize function, potentially leading to application instability.

You can use Vulert, which monitors open-source vulnerabilities in real-time. Without needing to sign up, you can check your application using the Vulert playground at Vulert Scanner.

The affected versions include TensorFlow versions prior to 2.5.3, 2.6.3, and 2.7.1.

The CVSS score for this vulnerability is 6.5, indicating a moderate severity level.

While there are no specific workarounds, it is crucial to prioritize updating TensorFlow to a patched version to mitigate the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

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

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