CVE-2018-21233: TensorFlow Integer Overflow in DecodeBmp Feature

tensorflow Updated 02 Oct 2025

Summary

04/05/2020
Yes i
High
6.5

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 across 2 version ranges.

< 1.7.0 < 49f73c55d56edffebde4bca4a407ad69c1cae433

Fixed in 49f73c55d56edffebde4bca4a407ad69c1cae433. How to fix ↓

Also tracked for

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.

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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open-source machine learning framework that provides a wide range of tools and libraries for building and deploying machine learning models. It is widely used in various domains, including research, industry, and academia. The vulnerability described here affects versions of TensorFlow prior to 1.7.0. TensorFlow includes a BMP decoder in its core/kernels/decode_bmp_op.cc file, which is responsible for decoding BMP image files. However, a flaw in the implementation of the DecodeBmp feature leads to an integer overflow, resulting in an out-of-bounds read. This vulnerability can potentially allow an attacker to access the contents of process memory, leading to information disclosure.

Vulnerability Detail

The vulnerability arises due to an integer overflow in the DecodeBmp feature of the BMP decoder in TensorFlow. When processing a BMP image file, the decoder fails to properly handle large values for the image dimensions, resulting in an integer overflow. This overflow can lead to an out-of-bounds read, potentially exposing the contents of process memory. An attacker could exploit this vulnerability to retrieve sensitive information from the affected system's memory, which may include cryptographic keys, passwords, or other confidential data. The impact of this vulnerability depends on the sensitivity of the information stored in the process memory and the attacker's ability to leverage the disclosed data.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==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==49f73c55d56edffebde4bca4a407ad69c1cae433"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, users can avoid the vulnerability by refraining from processing BMP image files using TensorFlow versions prior to 1.7.0. If BMP image decoding is necessary, it is recommended to update TensorFlow to the fixed version or apply the necessary patches provided by the TensorFlow project.

Conclusion

In conclusion, the vulnerability in TensorFlow prior to version 1.7.0 allows for an integer overflow in the DecodeBmp feature of the BMP decoder, potentially leading to an out-of-bounds read and information disclosure. Users are advised to update to the fixed version or apply the necessary patches to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework widely used for building and deploying machine learning models.

The vulnerability can potentially allow an attacker to access the contents of process memory, leading to information disclosure.

To fix this vulnerability, it is recommended to upgrade TensorFlow to version 1.7.0 or later.

As a workaround, users can avoid the vulnerability by refraining from processing BMP image files using TensorFlow versions prior to 1.7.0.

Users can obtain the latest version of TensorFlow from the official GitHub repository or through the PyPI package manager.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==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==49f73c55d56edffebde4bca4a407ad69c1cae433"

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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