CVE-2022-35981: TensorFlow Vulnerable to CHECK Fail in FractionalMaxPoolGrad

tensorflow Updated 18 Jul 2026

Summary

13/07/2026
Yes i
Moderate
5.9

CVE-2022-35981: TensorFlow vulnerable to CHECK fail in FractionalMaxPoolGrad. 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-35981 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 Penetration testing for web, API and mobile 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 library developed by Google, widely used for various applications including deep learning and neural networks. It provides a flexible architecture for deploying computation across different platforms. However, it has a vulnerability in the FractionalMaxPoolGrad function, which can lead to denial of service attacks if improperly sized inputs are provided.

Vulnerability Detail

The vulnerability arises from the way the FractionalMaxPoolGrad function validates its inputs. Instead of returning errors for incorrectly sized inputs, it uses CHECK failures. This can be exploited by an attacker to trigger a denial of service attack, causing the application to crash or become unresponsive. The issue is particularly concerning as it can be triggered with minimal effort by providing malformed input tensors.

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

Currently, there are no specific workarounds provided for this vulnerability. It is recommended to update to the patched version as soon as possible to mitigate the risk.

Conclusion

The vulnerability CVE-2022-35981 in TensorFlow poses a risk of denial of service attacks due to improper input validation in the FractionalMaxPoolGrad function. Users are strongly advised to update to the latest patched version to ensure the security of their applications.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-35981 is a vulnerability in TensorFlow that allows for denial of service attacks due to improper input validation in the FractionalMaxPoolGrad function.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The affected versions include TensorFlow 2.7.0 to 2.9.0. Users should upgrade to 2.10.0 or later to avoid this vulnerability.

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

While there are no specific workarounds, it is crucial to prioritize updating TensorFlow to the patched version to mitigate potential risks.

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.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