CVE-2020-15198: Heap buffer overflow in Tensorflow

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Moderate
5.4

CVE-2020-15198: Heap buffer overflow in Tensorflow. Affects tensorflow versions >= 2.3.0, < 2.3.1. Fixed in 2.3.1. How to fix ↓

Also tracked for

The same CVE-2020-15198 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 is widely used in various domains, including research, industry, and academia. However, a vulnerability has been discovered in Tensorflow that could lead to a heap buffer overflow.

Vulnerability Detail

The vulnerability, identified as CVE-2020-15198, is a heap buffer overflow in Tensorflow's SparseCountSparseOutput implementation. This vulnerability occurs due to the lack of validation for the shape of the indices tensor, which should match the shape of the values tensor. As a result, a shape mismatch can lead to accesses outside the bounds of heap allocated buffers. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial of service.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.1

This is the first release that contains the fix.

pip install --upgrade "tensorflow==2.3.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, users can follow the recommended fix by upgrading to Tensorflow 2.3.1 or later.

Conclusion

In conclusion, the heap buffer overflow vulnerability in Tensorflow (CVE-2020-15198) can be mitigated by upgrading to version 2.3.1 or later. It is important to regularly update Tensorflow to ensure the latest security patches are applied. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

The vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service by exploiting the heap buffer overflow in Tensorflow.

Versions 2.3.0 and earlier of Tensorflow are affected by this vulnerability. It is recommended to upgrade to version 2.3.1 or later.

To upgrade Tensorflow, you can use the following command: pip install --upgrade tensorflow==2.3.1.

The recommended mitigation is to upgrade to Tensorflow 2.3.1 or later, as this version includes the necessary patches to address the vulnerability.

You can refer to the official security guide of Tensorflow for more information about the security model and how to contact the Tensorflow team with any issues or questions.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.1

This is the first release that contains the fix.

pip install --upgrade "tensorflow==2.3.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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