CVE-2020-15204: TensorFlow CPU - Null Pointer Dereference in Eager Mode
Summary
CVE-2020-15204: In eager mode, TensorFlow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1 does not set the session state. Affects tensorflow-cpu 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
< 9a133d73ae4b4664d22bd1aa6d654fec13c52ee1
Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · Bitnami
- tensorflow · PyPI
- tensorflow-gpu · PyPI
- tensorflow · PyPI
The same CVE-2020-15204 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
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 CPU is a specific package within TensorFlow that focuses on running TensorFlow on CPUs. It is widely used in various industries and research domains for training and inference tasks.
Vulnerability Detail
The vulnerability (CVE-2020-15204) in TensorFlow CPU affects versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1. In eager mode, the session state is not properly set, leading to a null pointer dereference when calling tf.raw_ops.GetSessionHandle or tf.raw_ops.GetSessionHandleV2. This results in a segmentation fault and can potentially lead to a denial of service (DoS) attack. The issue was patched in commit 9a133d73ae4b4664d22bd1aa6d654fec13c52ee1 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.21.0 as of 22 Oct 2026
pip install --upgrade "tensorflow-cpu==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.41.15.4pip install --upgrade "tensorflow-cpu==1.15.4" -
>= 2.0.0, < 2.0.32.0.3pip install --upgrade "tensorflow-cpu==2.0.3" -
>= 2.1.0, < 2.1.22.1.2pip install --upgrade "tensorflow-cpu==2.1.2" -
>= 2.2.0, < 2.2.12.2.1pip install --upgrade "tensorflow-cpu==2.2.1" -
>= 2.3.0, < 2.3.12.3.1pip install --upgrade "tensorflow-cpu==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 CPU (CVE-2020-15204) can lead to a null pointer dereference in eager mode, potentially resulting in a denial of service (DoS) attack. It is crucial to update TensorFlow CPU to one of 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, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow-cpu →
FAQ
TensorFlow CPU is a package within TensorFlow that focuses on running TensorFlow on CPUs. It provides the necessary components and optimizations for efficient execution on CPU architectures.
Eager mode in TensorFlow allows for immediate execution of operations, providing a more intuitive and interactive programming experience. It enables users to evaluate TensorFlow operations and access their results directly.
A null pointer dereference occurs when a program attempts to access or dereference a null pointer, which does not point to a valid memory location. This can lead to crashes, segmentation faults, or other unexpected behavior.
The vulnerability can result in a segmentation fault, leading to a denial of service (DoS) attack. This can disrupt the availability and functionality of TensorFlow CPU, impacting any applications or systems relying on it for machine learning tasks.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the Pipfile.lock file as input.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.