Description
CImg Library is a C++ library for image processing. Prior to commit c3aacf5, the nb_colors field read from the BMP file header is used directly to compute an allocation size without validating it against the remaining file size. A crafted BMP file with a large nb_colors value triggers an out-of-memory condition, crashing any application that uses CImg to load untrusted BMP files. This issue has been patched via commit c3aacf5.
Published: 2026-05-04
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 06 May 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 04 May 2026 20:15:00 +0000

Type Values Removed Values Added
First Time appeared Greyclab
Greyclab cimg
Vendors & Products Greyclab
Greyclab cimg

Mon, 04 May 2026 18:15:00 +0000

Type Values Removed Values Added
Description CImg Library is a C++ library for image processing. Prior to commit c3aacf5, the nb_colors field read from the BMP file header is used directly to compute an allocation size without validating it against the remaining file size. A crafted BMP file with a large nb_colors value triggers an out-of-memory condition, crashing any application that uses CImg to load untrusted BMP files. This issue has been patched via commit c3aacf5.
Title CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp
Weaknesses CWE-789
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-06T13:44:14.581Z

Reserved: 2026-04-24T17:15:21.834Z

Link: CVE-2026-42146

cve-icon Vulnrichment

Updated: 2026-05-06T13:44:04.791Z

cve-icon NVD

Status : Deferred

Published: 2026-05-04T18:16:31.977

Modified: 2026-05-07T15:50:00.160

Link: CVE-2026-42146

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-04T20:00:07Z

Weaknesses