CVE-2022-35989: TensorFlow MaxPool CHECK Fail Vulnerability

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
5.9

CVE-2022-35989: TensorFlow vulnerable to CHECK fail in MaxPool. Affects tensorflow across 3 version ranges.

< 2.7.2 >= 2.8.0, < 2.8.1 >= 2.9.0, < 2.9.1

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

Also tracked for

The same CVE-2022-35989 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

TensorFlow is an open-source machine learning library developed by Google, widely used for building and training deep learning models. It provides a flexible ecosystem for deploying machine learning applications across various platforms. However, TensorFlow has a vulnerability in its MaxPool operation, which can lead to denial of service under specific conditions.

Vulnerability Detail

The vulnerability arises when the MaxPool operation receives a window size input array (ksize) with dimensions greater than its input tensor. This situation triggers a CHECK fail in the GPU kernel, which can be exploited to cause a denial of service attack. An attacker can craft inputs that lead to this failure, potentially disrupting services that rely on TensorFlow for processing.

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.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"
  • >= 2.9.0, < 2.9.1 2.9.1
    pip install --upgrade "tensorflow==2.9.1"

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, ensure that the ksize parameter passed to the MaxPool operation does not exceed the dimensions of the input tensor. Here is an example of how to avoid the vulnerability:

import tensorflow as tf import numpy as np

input_tensor = np.ones([1, 1, 1, 1]) ksize = [1, 1, 1, 1] # Ensure ksize does not exceed input dimensions strides = [1, 1, 1, 1] padding = 'VALID' data_format = 'NCHW'

tf.raw_ops.MaxPool(input=input_tensor, ksize=ksize, strides=strides, padding=padding, data_format=data_format)

Conclusion

The CVE-2022-35989 vulnerability in TensorFlow's MaxPool operation poses a risk of denial of service due to improper input handling. Users are advised to update to the latest patched versions to mitigate this risk and ensure the security of their applications.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-35989 is a vulnerability in TensorFlow's MaxPool operation that can lead to a denial of service when improperly configured input parameters are used.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

TensorFlow versions prior to 2.7.2, 2.8.1, and 2.9.1 are affected by this vulnerability.

The CVSS score of this vulnerability is 5.9, indicating a moderate severity level.

You can update TensorFlow by running the command: pip install --upgrade tensorflow in your terminal.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.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"
  • >= 2.9.0, < 2.9.1 2.9.1
    pip install --upgrade "tensorflow==2.9.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