CVE-2018-21233: Integer Overflow in TensorFlow BMP Decoder
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-cpu across 2 version ranges.
< 1.7.0
< 49f73c55d56edffebde4bca4a407ad69c1cae433
Fixed in 49f73c55d56edffebde4bca4a407ad69c1cae433. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-gpu · 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. The TensorFlow package in question, tensorflow-cpu, is a Python package that allows users to run TensorFlow on CPU-only systems. The vulnerability affects versions prior to 1.7.0 of tensorflow-cpu. The specific vulnerability lies in the BMP decoder's DecodeBmp feature, located in the core/kernels/decode_bmp_op.cc file. This vulnerability can lead to an integer overflow, resulting in an out-of-bounds read and potential disclosure of process memory contents.
Vulnerability Detail
The vulnerability (CVE-2018-21233) in TensorFlow's BMP decoder arises from an integer overflow issue. When processing BMP images, an attacker can manipulate the image data in a way that triggers the overflow. This can lead to an out-of-bounds read, potentially exposing sensitive information from the process memory. An attacker with access to a crafted BMP image could exploit this vulnerability to extract sensitive data or gain insights into the internal workings of the affected TensorFlow application. The vulnerability was fixed in version 1.7.0 of tensorflow-cpu.
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 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-cpu==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 crucial to update to the fixed version of tensorflow-cpu to mitigate the risk.
Conclusion
The vulnerability (CVE-2018-21233) in TensorFlow's BMP decoder can lead to an out-of-bounds read and potential disclosure of process memory contents. It is crucial to update the tensorflow-cpu package to version 1.7.0 or later to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow-cpu →
FAQ
TensorFlow is an open-source machine learning framework developed by Google. It provides tools and libraries for building and deploying machine learning models.
The tensorflow-cpu package is a Python package that allows users to run TensorFlow on CPU-only systems.
The BMP decoder in TensorFlow is a component responsible for decoding BMP image files.
An integer overflow occurs when an arithmetic operation results in a value that exceeds the range of representable values for a given integer type.
You can update tensorflow-cpu to the fixed version (1.7.0 or later) by running the command 'pip install --upgrade tensorflow-cpu'.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow-cpu.