CVE-2022-23579: Grappler's SafeToRemoveIdentity Vulnerability in TensorFlow

tensorflow Updated 02 Oct 2025

Summary

10/02/2022
Yes i
Moderate
6.5

CVE-2022-23579: CHECK-failures during Grappler's SafeToRemoveIdentity 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-23579 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 widely used for developing and training machine learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning applications. TensorFlow is vulnerable to a specific issue in the Grappler optimizer, which is responsible for optimizing TensorFlow models. This vulnerability can be exploited to cause a denial of service by manipulating a SavedModel in a way that triggers CHECK failures in the SafeToRemoveIdentity function.

Vulnerability Detail

The vulnerability in TensorFlow's Grappler optimizer allows an attacker to create a malicious SavedModel that, when processed by the optimizer, triggers CHECK failures in the SafeToRemoveIdentity function. This can lead to a denial of service, disrupting the normal functioning of TensorFlow. The issue has a CVSS score of 6.5, indicating a moderate severity level. The vulnerability affects versions 0 to 2.5.3, 2.6.0 to 2.6.3, and 2.7.0 to 2.7.1 of the TensorFlow package.

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.5.3 2.5.3
    pip install --upgrade "tensorflow==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow==2.6.3"
  • >= 2.7.0, < 2.7.1 2.7.1
    pip install --upgrade "tensorflow==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 mentioned for this vulnerability.

Conclusion

The vulnerability in TensorFlow's Grappler optimizer can be exploited to cause a denial of service. It is recommended to update TensorFlow to the patched versions or upgrade to TensorFlow 2.8.0. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for developing and training machine learning models.

The Grappler optimizer is a component of TensorFlow that optimizes TensorFlow models for better performance.

The vulnerability allows an attacker to cause a denial of service by manipulating a SavedModel to trigger CHECK failures in the SafeToRemoveIdentity function.

To fix the vulnerability, update TensorFlow to version 2.8.0 or apply the provided patches.

No specific workaround has been mentioned for this vulnerability.

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.5.3 2.5.3
    pip install --upgrade "tensorflow==2.5.3"
  • >= 2.6.0, < 2.6.3 2.6.3
    pip install --upgrade "tensorflow==2.6.3"
  • >= 2.7.0, < 2.7.1 2.7.1
    pip install --upgrade "tensorflow==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