CVE-2020-5215: Segmentation fault in TensorFlow when converting a Python string to tf.float16

tensorflow Updated 02 Oct 2025

Summary

28/01/2020
Yes i
Low
5.0

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 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 is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and community resources that enable researchers and developers to build and deploy 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. This vulnerability affects TensorFlow versions 0 to 1.15.2 and 2.0.0 to 2.0.1, as well as TensorFlow CPU and TensorFlow GPU packages.

Vulnerability Detail

The vulnerability arises when converting a Python string to a tf.float16 value in eager mode. The format checks for this use case are only present in graph mode, leading to a segmentation fault. An attacker can exploit this issue to cause a denial of service in inference/training scenarios by sending a data point containing a string instead of a tf.float16 value. Additionally, manipulating saved models and checkpoints by replacing a scalar tf.float16 value with a scalar string can trigger this vulnerability. An example of triggering this issue is tf.constant("hello", tf.float16) 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 in TensorFlow when converting a Python string to tf.float16 has been addressed in the latest versions. Users are advised to update their TensorFlow installations to the patched versions to mitigate the risk. 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.

The vulnerability can lead to a denial of service in inference/training scenarios and can be exploited by a malicious attacker to send a string instead of a tf.float16 value.

You can reproduce this vulnerability by executing tf.constant("hello", tf.float16) with eager execution enabled.

TensorFlow versions 0 to 1.15.2 and 2.0.0 to 2.0.1, as well as TensorFlow CPU and TensorFlow GPU packages, are affected.

To fix this vulnerability, update to TensorFlow versions 1.15.2, 2.0.1, or 2.1.0.

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