{"api_version":"1","generated_at":"2026-05-13T10:06:24+00:00","cve":"CVE-2026-42146","urls":{"html":"https://cve.report/CVE-2026-42146","api":"https://cve.report/api/cve/CVE-2026-42146.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-42146","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-42146"},"summary":{"title":"CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp","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.","state":"PUBLISHED","assigner":"GitHub_M","published_at":"2026-05-04 18:16:31","updated_at":"2026-05-07 15:50:00"},"problem_types":["CWE-789","CWE-789 CWE-789: Memory Allocation with Excessive Size Value"],"metrics":[{"version":"3.1","source":"security-advisories@github.com","type":"Secondary","score":"5.5","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"5.5","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","data":{"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"}}],"references":[{"url":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5","name":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv","name":"https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/GreycLab/CImg/issues/477","name":"https://github.com/GreycLab/CImg/issues/477","refsource":"134c704f-9b21-4f2e-91b3-4a467353bcc0","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3","name":"https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-42146","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42146","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"GreycLab","product":"CImg","version":"affected < c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"42146","cve":"CVE-2026-42146","epss":"0.000130000","percentile":"0.019690000","score_date":"2026-05-12","updated_at":"2026-05-13 00:11:54"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2026-42146","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2026-05-06T13:43:28.189688Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-05-06T13:44:14.581Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"references":[{"tags":["exploit"],"url":"https://github.com/GreycLab/CImg/issues/477"}],"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"product":"CImg","vendor":"GreycLab","versions":[{"status":"affected","version":"< c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3"}]}],"descriptions":[{"lang":"en","value":"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."}],"metrics":[{"cvssV3_1":{"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"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-789","description":"CWE-789: Memory Allocation with Excessive Size Value","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-05-04T17:53:23.830Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","shortName":"GitHub_M"},"references":[{"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"},{"name":"https://github.com/GreycLab/CImg/issues/477","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/issues/477"},{"name":"https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3"},{"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"}],"source":{"advisory":"GHSA-g54r-qmgx-c6fv","discovery":"UNKNOWN"},"title":"CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp"}},"cveMetadata":{"assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","assignerShortName":"GitHub_M","cveId":"CVE-2026-42146","datePublished":"2026-05-04T17:53:23.830Z","dateReserved":"2026-04-24T17:15:21.834Z","dateUpdated":"2026-05-06T13:44:14.581Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-05-04 18:16:31","lastModifiedDate":"2026-05-07 15:50:00","problem_types":["CWE-789","CWE-789 CWE-789: Memory Allocation with Excessive Size Value"],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"42146","Ordinal":"1","Title":"CImg Library: Uncontrolled memory allocation via nb_colors field","CVE":"CVE-2026-42146","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"42146","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"CImg Library: Uncontrolled memory allocation via nb_colors field"}]}}}