CVE-2022-29203: Integer overflow in TensorFlow's SpaceToBatchND

tensorflow Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.5

CVE-2022-29203: Integer overflow in SpaceToBatchND. Affects tensorflow across 3 version ranges.

< 2.6.4 >= 2.7.0, < 2.7.2 >= 2.8.0, < 2.8.1

Fixed in 2.6.4, 2.7.2 or 2.8.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-29203 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. The SpaceToBatchND operation is used to rearrange data by splitting it into blocks and interleaving them. This operation is vulnerable to an integer overflow, which can lead to a denial of service (DoS) attack.

Vulnerability Detail

The vulnerability in TensorFlow's SpaceToBatchND operation arises due to an integer overflow. When certain input values are provided, the implementation of tf.raw_ops.SpaceToBatchND can result in an integer overflow. This overflow is then used to allocate memory for the output tensor, leading to a DoS via a CHECK failure. An attacker can exploit this vulnerability to crash the TensorFlow application, causing a denial of service.

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.6.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip install --upgrade "tensorflow==2.8.1"

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. Updating to the patched version of TensorFlow is the recommended solution.

Conclusion

The vulnerability in TensorFlow's SpaceToBatchND operation has been addressed in the latest version of TensorFlow. It is crucial to update to the patched version or apply the provided patch to mitigate the risk of a denial of service attack. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

The vulnerability can be exploited by an attacker to crash the TensorFlow application, leading to a denial of service.

To fix this vulnerability, update TensorFlow to the latest version (2.9.0) or manually apply the provided patch.

No, only versions 2.6.4, 2.7.2, and 2.8.1 are affected. The vulnerability has been patched in TensorFlow 2.9.0.

No, this vulnerability requires the attacker to have access to the TensorFlow application.

This vulnerability was reported by Neophytos Christou from Secure Systems Lab at Brown University.

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.6.4 2.6.4
    pip install --upgrade "tensorflow==2.6.4"
  • >= 2.7.0, < 2.7.2 2.7.2
    pip install --upgrade "tensorflow==2.7.2"
  • >= 2.8.0, < 2.8.1 2.8.1
    pip install --upgrade "tensorflow==2.8.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