CVE-2020-15191: TensorFlow CPU - Invalid Argument in dlpack.to_dlpack
Summary
CVE-2020-15191: In Tensorflow before versions 2.2.1 and 2.3.1, if a user passes an invalid argument to dlpack.to_dlpack the expected validations will cause variables to bind to nullptr while setting a status variable to the error condit... Affects tensorflow-cpu across 3 version ranges.
< 2.2.1
>= 2.3.0rc0, < 2.3.1
< 22e07fb204386768e5bcbea563641ea11f96ceb8
Fixed in 2.2.1 or 2.3.1, depending 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-15191 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 widely used for building and training neural networks. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow CPU is a specific package within TensorFlow that focuses on running TensorFlow on CPUs. It allows users to leverage the power of CPUs for machine learning tasks. However, a vulnerability has been discovered in versions before 2.2.1 and 2.3.1 of TensorFlow CPU.
Vulnerability Detail
The vulnerability (CVE-2020-15191) arises when a user passes an invalid argument to the dlpack.to_dlpack function. This triggers expected validations, causing variables to bind to nullptr while setting a status variable to the error condition. However, the status argument is not properly checked, leading to references being bound to null pointers. This results in undefined behavior and can be reported as an error when compiling with -fsanitize=null. The issue has been patched in commit 22e07fb204386768e5bcbea563641ea11f96ceb8 and is released in TensorFlow versions 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.
-
< 2.2.12.2.1pip install --upgrade "tensorflow-cpu==2.2.1" -
>= 2.3.0rc0, < 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
In conclusion, the vulnerability (CVE-2020-15191) in TensorFlow CPU versions before 2.2.1 and 2.3.1 can lead to undefined behavior and errors. It is crucial to update to the patched versions to ensure the stability and security of TensorFlow CPU. For further support and assistance in 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 allows users to run TensorFlow on CPUs, enabling machine learning tasks without the need for specialized hardware.
The vulnerability can lead to undefined behavior and potential errors when compiling with certain flags. It is important to update to the patched versions to ensure the stability and security of TensorFlow CPU.
You can check the version of TensorFlow CPU installed by running the following command: pip show tensorflow-cpu.
While it is possible to continue using an older version of TensorFlow CPU, it is strongly recommended to update to the patched versions to mitigate the vulnerability and ensure the stability of your machine learning tasks.
You can find more information about the vulnerability in the TensorFlow CPU advisory database. The specific vulnerability ID is PYSEC-2020-271.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.