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.
Advisories
No advisories yet.
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
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
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: GitHub_M
Published:
Updated: 2026-05-04T17:53:23.830Z
Reserved: 2026-04-24T17:15:21.834Z
Link: CVE-2026-42146
No data.
Status : Received
Published: 2026-05-04T18:16:31.977
Modified: 2026-05-04T18:16:31.977
Link: CVE-2026-42146
No data.
OpenCVE Enrichment
Updated: 2026-05-04T20:00:07Z
Weaknesses