CVE-2020-26271: TensorFlow - Accessing Uninitialized Memory While Loading a Saved Model
Summary
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
- tensorflow · Bitnami
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
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.
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.
No signup required · Results in about 60 seconds
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.51.15.5pip install --upgrade "tensorflow==1.15.5" -
>= 2.0.0, < 2.0.42.0.4pip install --upgrade "tensorflow==2.0.4" -
>= 2.1.0, < 2.1.32.1.3pip install --upgrade "tensorflow==2.1.3" -
>= 2.2.0, < 2.2.22.2.2pip install --upgrade "tensorflow==2.2.2" -
>= 2.3.0, < 2.3.22.3.2pip 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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.