CVE-2018-21233: TensorFlow GPU Integer Overflow Out-of-Bounds Read
Summary
CVE-2018-21233: TensorFlow before 1.7.0 has an integer overflow that causes an out-of-bounds read, possibly causing disclosure of the contents of process memory. Affects tensorflow-gpu across 2 version ranges.
< 1.7.0
< 49f73c55d56edffebde4bca4a407ad69c1cae433
Fixed in 49f73c55d56edffebde4bca4a407ad69c1cae433. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
The same CVE-2018-21233 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-gpu is a Python package that enables GPU acceleration for TensorFlow. This vulnerability affects versions of TensorFlow-gpu before 1.7.0. The vulnerability resides in the DecodeBmp feature of the BMP decoder in the core/kernels/decode_bmp_op.cc file. It is caused by an integer overflow, leading to an out-of-bounds read. If exploited, this vulnerability could potentially disclose the contents of process memory.
Vulnerability Detail
The vulnerability in TensorFlow-gpu before version 1.7.0 is an integer overflow issue that triggers an out-of-bounds read. Specifically, the DecodeBmp feature of the BMP decoder in the core/kernels/decode_bmp_op.cc file is affected. By manipulating certain input data, an attacker could exploit this vulnerability to read the contents of process memory, potentially exposing sensitive information. This vulnerability poses a risk to systems utilizing TensorFlow-gpu versions prior to 1.7.0.
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 version below is the minimum fixed release for this vulnerability.
If you need the minimum change
49f73c55d56edffebde4bca4a407ad69c1cae433
This is the first release that contains the fix.
pip install --upgrade "tensorflow-gpu==49f73c55d56edffebde4bca4a407ad69c1cae433"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is strongly advised to apply the fix by upgrading to TensorFlow-gpu version 1.7.0 or later.
Conclusion
The vulnerability in TensorFlow-gpu versions prior to 1.7.0 allows for an integer overflow that leads to an out-of-bounds read. This can potentially result in the disclosure of process memory contents. To mitigate this vulnerability, it is crucial to upgrade TensorFlow-gpu to version 1.7.0 or later. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-gpu →
FAQ
TensorFlow is an open-source machine learning framework developed by Google. It provides tools and libraries for building and deploying machine learning models.
TensorFlow-gpu is a Python package that enables GPU acceleration for TensorFlow, allowing for faster computation of machine learning models on compatible hardware.
The DecodeBmp feature is a function in TensorFlow's BMP decoder that processes BMP image data and decodes it into a usable format for further processing.
An integer overflow occurs when the result of an arithmetic operation exceeds the maximum value that can be represented by the data type. In this case, it leads to a vulnerability that can be exploited to trigger an out-of-bounds read.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it for open-source vulnerabilities, including this one.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-gpu.