CVE-2020-15190: TensorFlow GPU - Segmentation Fault in Switch Operation

tensorflow-gpu Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Unrated
Not published

CVE-2020-15190: In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the tf.raw_ops.Switch operation takes as input a tensor and a boolean and outputs two tensors. 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 < da8558533d925694483d2c136a9220d6d49d843c

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-15190 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 resources for building and deploying machine learning models. TensorFlow GPU is a variant of TensorFlow that leverages the power of GPUs for accelerated computation. It allows users to train and run machine learning models on GPU devices, resulting in improved performance and efficiency. However, a vulnerability has been discovered in TensorFlow GPU versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.

Vulnerability Detail

The vulnerability, identified as CVE-2020-15190, exists in the tf.raw_ops.Switch operation in TensorFlow GPU. This operation takes a tensor and a boolean as input and outputs two tensors. Depending on the boolean value, one of the tensors is the input tensor itself, while the other should be an empty tensor. However, the eager runtime in TensorFlow traverses all tensors in the output, even though only one of them is defined. As a result, a reference is bound to a nullptr, leading to undefined behavior. If the code is compiled with -fsanitize=null, this can result in a segmentation fault. The issue has been patched 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 specific workaround mentioned for this vulnerability.

Conclusion

The vulnerability in TensorFlow GPU versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 can lead to a segmentation fault and program crashes. It is crucial to update to the patched versions to ensure the security and stability of machine learning workflows. 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 devices for accelerated computation in machine learning tasks.

The tf.raw_ops.Switch operation in TensorFlow GPU takes a tensor and a boolean as input and outputs two tensors. It allows conditional branching in the computation graph.

The vulnerability affects TensorFlow GPU versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.

The vulnerability can lead to a segmentation fault in TensorFlow GPU, causing the program to crash. This can result in disruption of machine learning workflows and potential data loss.

Yes, the vulnerability has been patched in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1. It is recommended to update to one of these versions to mitigate the risk.

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