CVE-2020-26271: TensorFlow: OOB read on saved model load leaks heap addresses
LOW PoC AVAILABLEA crafted TensorFlow SavedModel can trigger out-of-bounds memory reads during graph construction, leaking heap addresses that undermine ASLR. Exploitation requires local access and the ability to supply a malicious model file — the realistic threat is a supply chain attack where a poisoned model reaches your inference or training infrastructure. Patch to TF 1.15.5/2.0.4/2.1.3/2.2.2/2.3.2/2.4.0+ and enforce cryptographic verification of model artifacts before loading.
Risk Assessment
Low standalone severity (CVSS 3.3) due to local-only attack vector and limited direct impact. However, in AI/ML environments the risk profile elevates slightly: models are routinely downloaded from public registries, shared across teams, and loaded with elevated privileges inside GPU-attached hosts. If chained with a memory corruption primitive, the address leak could bypass ASLR. Organizations with uncontrolled model sourcing or no artifact signing are the primary risk group.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| tensorflow | pip | — | No patch |
Do you use tensorflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Patch TensorFlow to 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2, or 2.4.0+.
-
Enforce cryptographic signing (SHA-256 hash + signature) for all SavedModel artifacts and validate before loading.
-
Restrict model loading to trusted, internally-vetted sources; block unauthenticated model downloads in CI/CD and serving pipelines.
-
Run model loading in sandboxed environments (containers with seccomp/AppArmor) to limit blast radius of any memory disclosure.
-
For detection, monitor for unusual heap-spray patterns or repeated model-load failures on inference nodes — no public exploit code is known.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2020-26271?
A crafted TensorFlow SavedModel can trigger out-of-bounds memory reads during graph construction, leaking heap addresses that undermine ASLR. Exploitation requires local access and the ability to supply a malicious model file — the realistic threat is a supply chain attack where a poisoned model reaches your inference or training infrastructure. Patch to TF 1.15.5/2.0.4/2.1.3/2.2.2/2.3.2/2.4.0+ and enforce cryptographic verification of model artifacts before loading.
Is CVE-2020-26271 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2020-26271, increasing the risk of exploitation.
How to fix CVE-2020-26271?
1. Patch TensorFlow to 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2, or 2.4.0+. 2. Enforce cryptographic signing (SHA-256 hash + signature) for all SavedModel artifacts and validate before loading. 3. Restrict model loading to trusted, internally-vetted sources; block unauthenticated model downloads in CI/CD and serving pipelines. 4. Run model loading in sandboxed environments (containers with seccomp/AppArmor) to limit blast radius of any memory disclosure. 5. For detection, monitor for unusual heap-spray patterns or repeated model-load failures on inference nodes — no public exploit code is known.
What systems are affected by CVE-2020-26271?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, MLOps pipelines, model registries.
What is the CVSS score for CVE-2020-26271?
CVE-2020-26271 has a CVSS v3.1 base score of 3.3 (LOW). The EPSS exploitation probability is 0.02%.
Technical Details
NVD Description
In affected versions of TensorFlow under certain cases, loading a saved model can result in accessing uninitialized memory while building the computation graph. The MakeEdge function creates an edge between one output tensor of the src node (given by output_index) and the input slot of the dst node (given by input_index). This is only possible if the types of the tensors on both sides coincide, so the function begins by obtaining the corresponding DataType values and comparing these for equality. However, there is no check that the indices point to inside of the arrays they index into. Thus, this can result in accessing data out of bounds of the corresponding heap allocated arrays. In most scenarios, this can manifest as unitialized data access, but if the index points far away from the boundaries of the arrays this can be used to leak addresses from the library. This is fixed in versions 1.15.5, 2.0.4, 2.1.3, 2.2.2, 2.3.2, and 2.4.0.
Exploitation Scenario
An adversary compromises a public model repository or HuggingFace-style hub and publishes a TensorFlow SavedModel with edge indices in the graph definition that reference out-of-bounds positions in the type arrays inside MakeEdge. A data scientist or automated MLOps pipeline pulls and loads the model. During graph construction, TensorFlow reads beyond heap array boundaries, returning uninitialized memory containing library addresses. These addresses let the adversary calculate the ASLR base offset for libtensorflow, potentially enabling a chained follow-on exploit (e.g., a separately crafted model with an RCE primitive that now has a reliable memory layout). The victim sees no error unless the index is far enough out of bounds to cause a segfault.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N References
- github.com/tensorflow/tensorflow/commit/0cc38aaa4064fd9e79101994ce9872c6d91f816b Patch 3rd Party
- github.com/tensorflow/tensorflow/security/advisories/GHSA-q263-fvxm-m5mw Exploit Patch 3rd Party
Timeline
Related Vulnerabilities
CVE-2020-15196 9.9 TensorFlow: heap OOB read in sparse/ragged count ops
Same package: tensorflow CVE-2020-15205 9.8 TensorFlow: heap overflow in StringNGrams, ASLR bypass
Same package: tensorflow CVE-2020-15208 9.8 TFLite: OOB read/write via tensor dimension mismatch
Same package: tensorflow CVE-2019-16778 9.8 TensorFlow: heap overflow in UnsortedSegmentSum op
Same package: tensorflow CVE-2022-23587 9.8 TensorFlow: integer overflow in Grappler enables RCE
Same package: tensorflow
AI Threat Alert