CVE-2022-35997: TensorFlow Denial of Service Vulnerability in tf.sparse.cross

tensorflow Updated 18 Jul 2026

Summary

09/07/2026
Yes i
Moderate
5.9

CVE-2022-35997: TensorFlow vulnerable to CHECK fail in tf.sparse.cross. 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-35997 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 framework that enables developers to build and train machine learning models. It is widely used for various applications, including deep learning and neural networks. TensorFlow provides a rich set of tools and libraries for data manipulation, model training, and deployment. However, it is susceptible to certain vulnerabilities, including the one identified as CVE-2022-35997, which can lead to denial of service under specific conditions.

Vulnerability Detail

The vulnerability arises in the function tf.sparse.cross when it receives a non-scalar input for the 'separator' parameter. This results in a CHECK fail, which can be exploited to trigger a denial of service attack. An attacker can craft an input that causes the application to crash or become unresponsive, impacting the availability of the service. The vulnerability is particularly concerning as it can be triggered with minimal effort, making it a potential target for malicious actors.

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 mentioned for this vulnerability. It is recommended to update to the patched version as soon as possible to mitigate the risk.

Conclusion

CVE-2022-35997 is a significant vulnerability in TensorFlow that can lead to denial of service attacks. It is essential for users to update their TensorFlow installations to the fixed versions to ensure the security and reliability of their applications. Regular monitoring for vulnerabilities using tools like Vulert can help maintain a secure software environment.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

CVE-2022-35997 is a vulnerability in TensorFlow that can lead to a denial of service when the tf.sparse.cross function receives a non-scalar separator input.

If exploited, this vulnerability can cause your application to crash or become unresponsive, affecting its availability and reliability.

TensorFlow versions prior to 2.10.0, including 2.9.0, 2.8.0, and 2.7.0, are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground at Vulert Scanner without any signup.

While there are no specific workarounds, it is crucial to prioritize updating TensorFlow to the 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.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