CVE-2020-5215: TensorFlow - Segmentation Fault in Eager Mode

tensorflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2020-5215: Segmentation faultin TensorFlow when converting a Python string to tf.float16. Affects tensorflow across 2 version ranges.

< 1.15.2 >= 2.0.0, < 2.0.1

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 eager mode, operations are executed immediately as they are called, allowing for more interactive and intuitive development. However, this mode is susceptible to a vulnerability that can lead to a denial of service attack.

Vulnerability Detail

The vulnerability (CVE-2020-5215) in TensorFlow versions before 1.15.2 and 2.0.1 arises when converting a string from Python to a tf.float16 value in eager mode. The format checks for this use case are only present in graph mode, resulting in a segmentation fault. An attacker can exploit this issue by sending a data point containing a string instead of a tf.float16 value, causing 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 vulnerability. The issue can be easily reproduced using the code tf.constant("hello", tf.float16) with eager execution enabled. TensorFlow versions 1.15.1, 2.0.1, and 2.1.0 have been patched to address this vulnerability.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.15.2 1.15.2
  • >= 2.0.0, < 2.0.1 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 provided for this vulnerability. The recommended solution is to upgrade to the patched versions of TensorFlow.

Conclusion

The vulnerability (CVE-2020-5215) in TensorFlow versions before 1.15.2 and 2.0.1 can result in a segmentation fault in eager mode, leading to a denial of service attack. Upgrading to TensorFlow versions 1.15.2, 2.0.1, or 2.1.0 is necessary to mitigate this vulnerability. It is important to keep software dependencies up to date to ensure compatibility. For further support on vulnerability remediation, please 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 a denial of service attack in inference/training when a string is converted to a tf.float16 value in eager mode. An attacker can exploit this to disrupt the functioning of TensorFlow-based applications.

You can reproduce this vulnerability by executing the code tf.constant("hello", tf.float16) with eager execution enabled in a vulnerable version of TensorFlow.

Versions of TensorFlow before 1.15.2 and 2.0.1 are affected by this vulnerability. TensorFlow 2.1.0 and later versions are not affected.

No specific workarounds are provided for this vulnerability. It is recommended to upgrade to the patched versions of TensorFlow.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.15.2 1.15.2
  • >= 2.0.0, < 2.0.1 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