CVE-2020-26271: TensorFlow - Accessing Uninitialized Memory While Loading a Saved Model

tensorflow Updated 02 Oct 2025

Summary

10/12/2020
Yes i
Moderate
4.4

CVE-2020-26271: In affected versions of TensorFlow under certain cases, loading a saved model can result in accessing uninitialized memory while building the computation graph. Affects tensorflow across 6 version ranges.

< 0cc38aaa4064fd9e79101994ce9872c6d91f816b < 1.15.5 >= 2.0.0, < 2.0.4 >= 2.1.0, < 2.1.3 >= 2.2.0, < 2.2.2 >= 2.3.0, < 2.3.2

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

Also tracked for

The same CVE-2020-26271 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 developed by Google. It provides a comprehensive ecosystem of tools, libraries, and community resources for building and deploying machine learning models. TensorFlow allows users to define and execute computational graphs, which represent the flow of data through a series of mathematical operations. These graphs can be saved and loaded to reuse trained models. However, in certain cases, loading a saved model in TensorFlow can result in accessing uninitialized memory while building the computation graph.

Vulnerability Detail

The vulnerability (CVE-2020-26271) in TensorFlow arises due to the MakeEdge function, which creates an edge between output and input tensors of different nodes in the computation graph. The function checks the data types of the tensors to ensure compatibility but fails to validate the indices used to access the arrays. As a result, it is possible to access data out of bounds of the allocated arrays, leading to uninitialized data access or potential address leakage. This vulnerability can have various consequences, including information disclosure and potential exploitation for further attacks.

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.

  • < 1.15.5 1.15.5
    pip install --upgrade "tensorflow==1.15.5"
  • >= 2.0.0, < 2.0.4 2.0.4
    pip install --upgrade "tensorflow==2.0.4"
  • >= 2.1.0, < 2.1.3 2.1.3
    pip install --upgrade "tensorflow==2.1.3"
  • >= 2.2.0, < 2.2.2 2.2.2
    pip install --upgrade "tensorflow==2.2.2"
  • >= 2.3.0, < 2.3.2 2.3.2
    pip install --upgrade "tensorflow==2.3.2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a workaround, users can avoid loading saved models in TensorFlow until they have updated to a fixed version. Additionally, it is advisable to follow secure coding practices and avoid exposing TensorFlow models to untrusted sources.

Conclusion

The vulnerability (CVE-2020-26271) in TensorFlow allows for accessing uninitialized memory while loading saved models, potentially leading to information disclosure or address leakage. It is crucial to update TensorFlow to one of the recommended versions and follow secure coding practices to mitigate the risk. For further 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 developed by Google. It provides tools and libraries for building and deploying machine learning models.

The MakeEdge function in TensorFlow creates an edge between output and input tensors of different nodes in the computation graph.

The vulnerability can result in accessing uninitialized memory, leading to potential information disclosure or address leakage.

To fix this vulnerability, update TensorFlow to one of the recommended versions: 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2, or 2.4.0.

As a workaround, avoid loading saved models in TensorFlow until the software has been updated 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.

  • < 1.15.5 1.15.5
    pip install --upgrade "tensorflow==1.15.5"
  • >= 2.0.0, < 2.0.4 2.0.4
    pip install --upgrade "tensorflow==2.0.4"
  • >= 2.1.0, < 2.1.3 2.1.3
    pip install --upgrade "tensorflow==2.1.3"
  • >= 2.2.0, < 2.2.2 2.2.2
    pip install --upgrade "tensorflow==2.2.2"
  • >= 2.3.0, < 2.3.2 2.3.2
    pip install --upgrade "tensorflow==2.3.2"

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