CVE-2020-15205: TensorFlow GPU - Heap Overflow and Memory Leak in StringNGrams

tensorflow-gpu Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Unrated
Not published

CVE-2020-15205: In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the data_splits argument of tf.raw_ops.StringNGrams lacks validation. Affects tensorflow-gpu across 6 version ranges.

< 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 < 0462de5b544ed4731aa2fb23946ac22c01856b80

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-15205 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 GPU is a variant of TensorFlow that leverages GPU acceleration for faster computation. This vulnerability affects versions of TensorFlow GPU before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.

Vulnerability Detail

The vulnerability (CVE-2020-15205) resides in the data_splits argument of the tf.raw_ops.StringNGrams function in TensorFlow GPU. This argument lacks proper validation, allowing a user to pass values that can trigger heap overflow errors and potentially leak the contents of memory. An attacker could exploit this issue to retrieve sensitive information from the memory stack, including return addresses, which can be used to bypass Address Space Layout Randomization (ASLR) protections. The vulnerability has been patched in commit 0462de5b544ed4731aa2fb23946ac22c01856b80 and is addressed in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-gpu==2.12.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-gpu==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow-gpu==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow-gpu==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow-gpu==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow-gpu==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 crucial to update to the patched versions of TensorFlow GPU to mitigate the risk of exploitation.

Conclusion

The vulnerability (CVE-2020-15205) in TensorFlow GPU allows for heap overflow errors and memory leaks, potentially leading to the exposure of sensitive information and bypassing ASLR protections. It is crucial to update to the patched versions (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-gpu →

Share this vulnerability

FAQ

TensorFlow GPU is a variant of TensorFlow that utilizes GPU acceleration for faster machine learning computations.

This vulnerability can lead to heap overflow errors and memory leaks, potentially exposing sensitive information and allowing attackers to bypass ASLR protections.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. No signup is required, and Vulert will analyze your Pipfile.lock to provide real-time alerts for open-source vulnerabilities.

No, there are no known workarounds for this vulnerability. Updating to the patched versions of TensorFlow GPU is the recommended solution.

You can find more information about this vulnerability in the TensorFlow GPU advisory PYSEC-2020-320 at https://github.com/pypa/advisory-database/blob/main/vulns/tensorflow-gpu/PYSEC-2020-320.yaml.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-gpu.

How To Fix

Latest published version: 2.12.0 as of 22 Oct 2026

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