CVE-2020-15209: Null Pointer Dereference in TensorFlow Lite

tensorflow-cpu Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Unrated
Not published

CVE-2020-15209: In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, a crafted TFLite model can force a node to have as input a tensor backed by a nullptr buffer. Affects tensorflow-cpu across 6 version ranges.

< 0b5662bc2be13a8c8f044d925d87fb6e56247cd8 < 1.15.4 >= 2.0.0, < 2.0.3 >= 2.1.0, < 2.1.2 >= 2.2.0, < 2.2.1 >= 2.3.0, < 2.3.1

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-15209 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 Lite is an open-source deep learning framework developed by Google. It is designed to run machine learning models on resource-constrained devices such as mobile phones and embedded systems. TensorFlow Lite provides a lightweight and efficient runtime for executing models in a variety of environments. However, versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 are vulnerable to a null pointer dereference issue.

Vulnerability Detail

The vulnerability in TensorFlow Lite arises from a flaw in the handling of TFLite models. A specially crafted TFLite model can manipulate the buffer index in the flatbuffer serialization, causing a node to have an input tensor backed by a nullptr buffer. This effectively converts a read-only tensor to a read-write one. The runtime assumes that these buffers are initialized before any possible read operation. However, since the model does not include any instructions to write to the manipulated tensor, a null pointer dereference occurs when attempting to access it. This vulnerability can be exploited to cause a denial-of-service condition or potentially execute arbitrary code.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==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.4 1.15.4
    pip install --upgrade "tensorflow-cpu==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow-cpu==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow-cpu==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow-cpu==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow-cpu==2.3.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 known workaround for this vulnerability. It is essential to update to the patched versions of TensorFlow Lite to mitigate the risk.

Conclusion

The null pointer dereference vulnerability in TensorFlow Lite can be exploited by a specially crafted TFLite model to cause a denial-of-service condition or potentially execute arbitrary code. It is crucial for users to update their installations to the patched versions of TensorFlow Lite (1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1) to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow Lite is an open-source deep learning framework developed by Google. It is designed for running machine learning models on resource-constrained devices.

A null pointer dereference occurs when a program attempts to access or manipulate a memory location that has a null pointer value. This can lead to crashes or other unexpected behavior.

An attacker can craft a malicious TFLite model that triggers the null pointer dereference issue. By manipulating the buffer index in the model's flatbuffer serialization, they can convert a read-only tensor to a read-write one, causing a null pointer dereference when the tensor is accessed.

The vulnerability can lead to a denial-of-service condition or potentially allow an attacker to execute arbitrary code. This could result in the compromise of the affected system or the unauthorized access to sensitive information.

No, only versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 are vulnerable to this issue. It is recommended to update to the patched versions to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==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.4 1.15.4
    pip install --upgrade "tensorflow-cpu==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow-cpu==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow-cpu==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow-cpu==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow-cpu==2.3.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