CVE-2020-5215: TensorFlow Denial of Service Vulnerability

tensorflow Updated 02 Oct 2025

Summary

28/01/2020
Yes i
Low
5.0

CVE-2020-5215: In TensorFlow before 1.15.2 and 2.0.1, converting a string (from Python) to a tf.float16 value results in a segmentation fault in eager mode as the format checks for this use case are only in the graph mode. Affects tensorflow across 3 version ranges.

< 1.15.2 >= 2.0.0, < 2.0.1 < 5ac1b9e24ff6afc465756edf845d2e9660bd34bf

Fixed in 1.15.2 or 2.0.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2020-5215 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow supports both graph mode and eager mode execution. In graph mode, computations are defined as a static graph, while in eager mode, computations are executed immediately. TensorFlow allows conversion of data types, including converting strings to tf.float16 values.

Vulnerability Detail

The vulnerability (CVE-2020-5215) exists in TensorFlow versions before 1.15.2 and 2.0.1. When converting a string to a tf.float16 value in eager mode, a segmentation fault occurs. This issue is due to the lack of format checks for this use case in eager mode, as they are only present in graph mode. An attacker can exploit this vulnerability by sending a data point containing a string instead of a tf.float16 value, leading to a denial of service in inference/training. Additionally, manipulating saved models and checkpoints by replacing a scalar tf.float16 value with a scalar string can trigger this issue. The vulnerability can be easily reproduced by using the tf.constant("hello", tf.float16) function with eager execution enabled.

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 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.2 1.15.2
    pip install --upgrade "tensorflow==1.15.2"
  • >= 2.0.0, < 2.0.1 2.0.1
    pip install --upgrade "tensorflow==2.0.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 specific workaround mentioned for this vulnerability.

Conclusion

The vulnerability (CVE-2020-5215) in TensorFlow allows for a denial of service attack in inference/training. It can be exploited by sending a string instead of a tf.float16 value or manipulating saved models and checkpoints. Upgrading to TensorFlow 1.15.1, 2.0.1, or 2.1.0 resolves the issue. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework developed by Google. It provides tools and resources for building and deploying machine learning models.

The vulnerability can lead to denial of service in inference/training in TensorFlow. An attacker can send a data point containing a string instead of a tf.float16 value, causing a segmentation fault.

The vulnerability can be exploited by sending a data point with a string instead of a tf.float16 value or by manipulating saved models and checkpoints to replace a tf.float16 value with a string.

TensorFlow versions before 1.15.2 and 2.0.1 are affected by this vulnerability.

To fix the vulnerability, upgrade to TensorFlow 1.15.1 or 2.0.1, or switch to TensorFlow 2.1.0, which is not affected.

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 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.2 1.15.2
    pip install --upgrade "tensorflow==1.15.2"
  • >= 2.0.0, < 2.0.1 2.0.1
    pip install --upgrade "tensorflow==2.0.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