CVE-2021-41203: Missing validation during checkpoint loading in TensorFlow

tensorflow Updated 02 Oct 2025

Summary

10/11/2021
Yes i
High
7.8

CVE-2021-41203: Missing validation during checkpoint loading. Affects tensorflow across 3 version ranges.

< 2.4.4 >= 2.5.0, < 2.5.2 >= 2.6.0, < 2.6.1

Fixed in 2.4.4, 2.5.2 or 2.6.1, depending 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 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 widely used for building and training various deep learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning applications. TensorFlow supports loading and saving checkpoints, which are files containing the trained model's parameters and other necessary information for inference or further training. However, a vulnerability has been discovered in TensorFlow's checkpoint loading mechanism, which can be exploited by an attacker to trigger undefined behavior, integer overflows, segfaults, and CHECK-fail crashes. This vulnerability arises due to the lack of validation for invalid file formats during the loading process.

Vulnerability Detail

The missing validation during checkpoint loading in TensorFlow can allow an attacker to manipulate saved checkpoints from outside the TensorFlow environment. By providing maliciously crafted checkpoint files, an attacker can cause undefined behavior and various types of crashes, potentially leading to a denial-of-service (DoS) condition or even remote code execution. The absence of proper validation for file formats allows the attacker to exploit vulnerabilities in TensorFlow's checkpoint loading infrastructure. This vulnerability has a CVSS score of 7.8, indicating a high severity level.

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"

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

Conclusion

The missing validation during checkpoint loading vulnerability in TensorFlow can have severe consequences, including crashes and potential remote code execution. It is crucial to update TensorFlow to the patched versions as soon as they are available. For further support and assistance in 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 building and training deep learning models.

A checkpoint in TensorFlow is a file that contains the trained model's parameters and other necessary information for inference or further training.

This vulnerability can allow an attacker to trigger undefined behavior, crashes, and potential remote code execution by manipulating saved checkpoints.

The CVSS score of this vulnerability is 7.8, indicating a high severity level.

To fix this vulnerability, it is recommended to update TensorFlow to the latest version once the patches are released.

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"

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