CVE-2022-23575: TensorFlow CPU - Integer Overflow in OpLevelCostEstimator::CalculateTensorSize

tensorflow-cpu Updated 02 Oct 2025

Summary

04/02/2022
Yes i
Unrated
Not published

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

< 2.5.3 >= 2.6.0, < 2.6.3 < fcd18ce3101f245b083b30655c27b239dc72221e

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-23575 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 Your last release was probably never penetration tested 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 ecosystem of tools, libraries, and resources to facilitate the development of AI applications. TensorFlow CPU is a specific package that focuses on providing CPU support for TensorFlow. It allows users to run TensorFlow models on CPUs without the need for specialized hardware. However, a vulnerability has been discovered in the implementation of OpLevelCostEstimator::CalculateTensorSize in TensorFlow CPU.

Vulnerability Detail

The vulnerability arises due to an integer overflow in the OpLevelCostEstimator::CalculateTensorSize function. If an attacker can create an operation that involves a tensor with a large number of elements, it can trigger the integer overflow. This can lead to various security issues, including memory corruption, crashes, or even potential remote code execution. The vulnerability affects versions of TensorFlow CPU up to and including 2.5.3, 2.6.3, and 2.7.1. However, the fix will be included in TensorFlow 2.8.0.

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.5.3 2.5.3
    pip install --upgrade "tensorflow-cpu==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow-cpu==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, users can consider limiting the size of tensors used in their operations to avoid triggering the integer overflow. By carefully managing the size of tensors, the risk of exploitation can be reduced. However, this workaround may not be feasible in all scenarios, and it is still recommended to apply the official fix by updating to the patched versions of TensorFlow CPU.

Conclusion

In conclusion, TensorFlow CPU is vulnerable to an integer overflow in the OpLevelCostEstimator::CalculateTensorSize function. This vulnerability can have severe consequences, including memory corruption and potential remote code execution. It is crucial to update to the patched versions of TensorFlow CPU or apply the respective updates once they are released. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for developing and deploying AI models.

The vulnerability can lead to memory corruption, crashes, or potential remote code execution.

Versions up to and including 2.5.3, 2.6.3, and 2.7.1 are affected.

Update TensorFlow CPU to version 2.8.0 once it is released, or apply the respective updates for versions 2.5.3, 2.6.3, and 2.7.1.

Users can limit the size of tensors used in their operations to reduce the risk of exploitation.

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