CVE-2022-21737: TensorFlow - Denial of Service Vulnerability

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2022-21737: Assertion failure based denial of service in Tensorflow. Affects tensorflow across 3 version ranges.

< 2.5.3 >= 2.6.0, < 2.6.3 >= 2.7.0, < 2.7.1

Fixed in 2.5.3, 2.6.3 or 2.7.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-21737 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 developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. This vulnerability affects versions of TensorFlow ranging from 0 to 2.7.0, exposing the framework to a denial of service attack.

Vulnerability Detail

The vulnerability in TensorFlow lies in the implementation of *Bincount operations. Malicious users can exploit this vulnerability by providing specific input arguments that trigger a CHECK-fail. Some of these conditions are not caught during shape inference, while others are not detected during kernel implementation. As a result, CHECK failures occur when allocating output tensors. This vulnerability can be exploited to cause a denial of service, potentially disrupting the availability of TensorFlow-based applications. The issue has been assigned CVE-2022-21737.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.5.3 2.5.3
  • >= 2.6.0, < 2.6.3 2.6.3
  • >= 2.7.0, < 2.7.1 2.7.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. Users are encouraged to update to the fixed versions of TensorFlow as mentioned in the 'how_to_fix' section.

Conclusion

The vulnerability in TensorFlow's *Bincount operations can be exploited to cause a denial of service. Users are advised to update their TensorFlow installations to the fixed versions mentioned above to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

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.

This vulnerability allows malicious users to cause a denial of service by exploiting the *Bincount operations in TensorFlow. It can potentially disrupt the availability of TensorFlow-based applications.

Versions of TensorFlow ranging from 0 to 2.7.0 are affected by this vulnerability.

To fix this vulnerability, users should update their TensorFlow installations to one of the fixed versions: TensorFlow 2.8.0, TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3.

No specific workaround is provided for this vulnerability. Updating to the fixed versions of TensorFlow is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 2.5.3 2.5.3
  • >= 2.6.0, < 2.6.3 2.6.3
  • >= 2.7.0, < 2.7.1 2.7.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