CVE Explorer
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 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.
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"CImg","vendor":"GreycLab","versions":[{"status":"affected","version":"< c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":5.5,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/metrics/0/cvssV3_1
CWE assertions
1 source assertion{"cweId":"CWE-789","description":"CWE-789: Memory Allocation with Excessive Size Value","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/problemTypes/0/descriptions/0
Source references
5 source assertions{"name":"https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/references/2
{"name":"https://github.com/GreycLab/CImg/issues/477","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/issues/477"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/references/1
{"tags":["exploit"],"url":"https://github.com/GreycLab/CImg/issues/477"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/adp/0/references/0
{"name":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/references/3
{"name":"https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv","tags":["x_refsource_CONFIRM"],"url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a78bf8c609af4d6a96019af13f6a2a5cad663bc2fd18a8a2608a4dd0e8ac7154 · sha256:a7a0186ddbdeb5ef… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.