CVE-2021-41203: TensorFlow Checkpoints Loading Infrastructure Validation Bypass

tensorflow Updated 02 Oct 2025

Summary

05/11/2021
Yes i
High
7.8

CVE-2021-41203: TensorFlow is an open source platform for machine learning. Affects tensorflow across 8 version ranges.

< 2.4.4 >= 2.5.0, < 2.5.2 >= 2.6.0, < 2.6.1 >= 2.7.0rc0, < 2.7.0 < 368af875869a204b4ac552b9ddda59f6a46a56ec < abcced051cb1bd8fb05046ac3b6023a7ebcc4578 < b619c6f865715ca3b15ef1842b5b95edbaa710ad < e8dc63704c88007ee4713076605c90188d66f3d2

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-41203 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 platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow allows users to create, train, and evaluate machine learning models using a variety of algorithms and techniques. It is widely used in both research and production environments for tasks such as image recognition, natural language processing, and recommendation systems. However, in certain versions of TensorFlow, there is a vulnerability in the checkpoints loading infrastructure that can be exploited by an attacker to trigger undefined behavior, integer overflows, segfaults, and CHECK-fail crashes.

Vulnerability Detail

The vulnerability in TensorFlow arises from the lack of validation for invalid file formats when loading checkpoints. If an attacker is able to change the saved checkpoints from outside of TensorFlow, they can exploit this vulnerability to cause various issues, including undefined behavior, integer overflows, segfaults, and CHECK-fail crashes. These issues can potentially lead to denial of service (DoS) attacks, data corruption, or even remote code execution. The affected versions of TensorFlow include 2.4.4, 2.5.2, 2.6.1, and 2.7.0rc0. The TensorFlow development team has addressed this vulnerability and the fixes will be included in TensorFlow 2.7.0. Additionally, the fixes have been backported to TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4 to ensure that these versions are also protected.

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.4.4 2.4.4
    pip install --upgrade "tensorflow==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow==2.6.1"
  • >= 2.7.0rc0, < 2.7.0 2.7.0
    pip install --upgrade "tensorflow==2.7.0"

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. It is recommended to follow the steps mentioned in the 'how_to_fix' section to update TensorFlow to a fixed version.

Conclusion

In conclusion, the vulnerability in TensorFlow's checkpoints loading infrastructure can be exploited by an attacker to cause various issues, including undefined behavior, integer overflows, segfaults, and CHECK-fail crashes. The TensorFlow development team has addressed this vulnerability and released fixed versions. It is important for users to update their TensorFlow installations to the latest fixed version or apply the respective patches to ensure the security and stability of their machine learning models. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open source platform for machine learning that provides tools and resources for developing and deploying machine learning models.

This vulnerability in TensorFlow can be exploited by an attacker to trigger undefined behavior, integer overflows, segfaults, and CHECK-fail crashes. It can potentially lead to denial of service (DoS) attacks, data corruption, or remote code execution.

The affected versions of TensorFlow include 2.4.4, 2.5.2, 2.6.1, and 2.7.0rc0.

To fix this vulnerability, it is recommended to update TensorFlow to version 2.7.0 or apply the respective patches for the affected versions.

There are no specific workarounds mentioned for this vulnerability. It is recommended to update TensorFlow to a fixed version.

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.4.4 2.4.4
    pip install --upgrade "tensorflow==2.4.4"
  • >= 2.5.0, < 2.5.2 2.5.2
    pip install --upgrade "tensorflow==2.5.2"
  • >= 2.6.0, < 2.6.1 2.6.1
    pip install --upgrade "tensorflow==2.6.1"
  • >= 2.7.0rc0, < 2.7.0 2.7.0
    pip install --upgrade "tensorflow==2.7.0"

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