
CVE catalog
CVE-2026-42146
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 agai
- Severity
- Medium · CVSS 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.12% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | cimg | sid | 4.0.4+dfsg-1 | fixed |
| Debian | cimg | forky | 4.0.4+dfsg-1 | fixed |
| Debian | cimg | trixie | 3.5.2+dfsg-1+deb13u1 | fixed |
| Debian | cimg | bookworm | 3.2.1+dfsg-1 | vulnerable |
| Cpe | cimg | Not reported | Not reported | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | cimg | source | sid | 3.5.2+dfsg-2 | not yet assigned | Not reported | [1135778] |
| Debian | cimg | source | forky | 3.5.2+dfsg-2 | not yet assigned | Not reported | [1135778] |
| Debian | cimg | source | trixie | 3.5.2+dfsg-1+deb13u1 | not yet assigned | Not reported | [1135778] |
| Debian | cimg | source | bookworm | (unfixed) | not yet assigned | Not reported | [1135778] |
Notes
[bookworm] cimg: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [cimg-dev]Affected
Source package: [cimg]
Details (2)
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
- [cimg-doc]Affected
Source package: [cimg]
Details (2)
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
- [cimg-examples]Affected
Source package: [cimg]
Details (2)
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
[Debian 13 (Trixie)]
- [cimg-dev]Fixed
Source package: [cimg]
Details (2)
3.5.2+dfsg-1+deb13u1· all · trixieFixed · Fixed:
3.5.2+dfsg-1+deb13u1nvd · cimg · debian · 13
3.5.2+dfsg-1+deb13u1· all · trixieFixed · Fixed:
3.5.2+dfsg-1+deb13u1nvd · cimg · debian · 13
- [cimg-doc]Fixed
Source package: [cimg]
Details (2)
3.5.2+dfsg-1+deb13u1· all · trixieFixed · Fixed:
3.5.2+dfsg-1+deb13u1nvd · cimg · debian · 13
3.5.2+dfsg-1+deb13u1· all · trixieFixed · Fixed:
3.5.2+dfsg-1+deb13u1nvd · cimg · debian · 13
- [cimg-examples]Fixed
Source package: [cimg]
Details (2)
3.5.2+dfsg-1+deb13u1· all · trixieFixed · Fixed:
3.5.2+dfsg-1+deb13u1nvd · cimg · debian · 13
3.5.2+dfsg-1+deb13u1· all · trixieFixed · Fixed:
3.5.2+dfsg-1+deb13u1nvd · cimg · debian · 13
Observed:
References
- [https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3]
- [https://github.com/GreycLab/CImg/issues/477]
- [https://github.com/GreycLab/CImg/releases/tag/v.3.7.5]
- [https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-42146]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-42146]
- [https://security-tracker.debian.org/tracker/CVE-2026-42146]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42146.json]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]