CVE-2020-26271: TensorFlow: OOB read on saved model load leaks heap addresses

LOW PoC AVAILABLE
Published December 10, 2020
CISO Take

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.

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
195.0K OpenSSF 7.2 3.7K dependents Pushed 6d ago 4% patched ~1372d to patch Full package profile →

Do you use tensorflow? You're affected.

Severity & Risk

CVSS 3.1
3.3 / 10
EPSS
0.0%
chance of exploitation in 30 days
Higher than 4% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Local
AC Low
PR Low
UI None
S Unchanged
C Low
I None
A None

Recommended Action

5 steps
  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.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art.15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6 - AI system security and resilience
NIST AI RMF
GOVERN 1.7 - Organizational practices for AI risk management include provenance MANAGE 2.2 - Mechanisms to sustain treatment of AI risks
OWASP LLM Top 10
LLM03 - Training Data Poisoning

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.

CVSS Vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Timeline

Published
December 10, 2020
Last Modified
November 21, 2024
First Seen
December 10, 2020

Related Vulnerabilities