Description
CImg through 4.0.6 contains a heap out-of-bounds read vulnerability in the _load_bmp() function of CImg.h caused by an integer overflow in the row byte count. Attackers can supply a crafted BMP file with a large header width that wraps dx_bytes, causing crashes or heap memory disclosure into the decoded image.
Published: 2026-10-27
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: Heap out‑of‑bounds read that can lead to crashes or memory disclosure
Action: Patch
AI Analysis

Impact

The vulnerability is an integer overflow in CImg’s BMP loader that causes a heap out‑of‑bounds read when a BMP file has an excessively large header width. An attacker who can supply such a crafted file can cause buffer reads beyond allocated memory, potentially leaking heap data or crashing the application during image decoding.

Affected Systems

GreycLab’s CImg library up to and including version 4.0.6 is affected. Any system that imports and uses this library to process BMP images, without vetting input, is potentially vulnerable.

Risk and Exploitability

The CVSS score of 6.9 indicates moderate severity and the absence of an EPSS score means the exploitation probability is unknown. The vulnerability is not listed in the CISA KEV catalog, suggesting no known active attacks at this time. Based on the description, the likely attack vector is local or remote execution of the vulnerable library with a malicious BMP file; the attack requires the ability to supply a file to the application but does not require privileged access.

Generated by OpenCVE AI on October 27, 2026 at 14:52 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CImg to a version newer than 4.0.6, ensuring the integer overflow in _load_bmp() is fixed.
  • Validate BMP header values—specifically width and byte calculations—before feeding them to the CImg loader, rejecting files that exceed reasonable bounds.
  • Process BMP files in an isolated environment with restricted permissions to limit the impact of any potential heap disclosure.

Generated by OpenCVE AI on October 27, 2026 at 14:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 27 Oct 2026 13:45:00 +0000

Type Values Removed Values Added
Description CImg through 4.0.6 contains a heap out-of-bounds read vulnerability in the _load_bmp() function of CImg.h caused by an integer overflow in the row byte count. Attackers can supply a crafted BMP file with a large header width that wraps dx_bytes, causing crashes or heap memory disclosure into the decoded image.
Title GreycLab CImg through 4.0.6 Heap Out-of-Bounds Read via Integer Overflow in _load_bmp()
First Time appeared Cimg
Cimg cimg
Weaknesses CWE-190
CPEs cpe:2.3:a:cimg:cimg:*:*:*:*:*:*:*:*
Vendors & Products Cimg
Cimg cimg
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-27T13:07:51.020Z

Reserved: 2026-10-27T11:25:20.561Z

Link: CVE-2026-117555

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-27T14:16:36.187

Modified: 2026-10-27T14:16:36.187

Link: CVE-2026-117555

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-27T15:00:05Z

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound