{"id":"CVE-2026-42144","state":"PUBLISHED","title":"CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)","description":"CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the W*H*D size computation inside _load_pnm() that can bypass the memory allocation guard. A crafted PNM/PGM/PPM file with large dimension values causes the overflow to wrap around, allocating an undersized buffer and potentially triggering a heap buffer overflow. Any application using CImg to load untrusted image files is affected. This issue has been patched via commit 4ca26bc.","publishedAt":"2026-05-04T17:51:38.144Z","updatedAt":"2026-05-05T14:14:38.921Z","severity":{"score":6.1,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["GreycLab CImg"],"affected":[{"vendor":"GreycLab","product":"CImg","versions":[{"version":"< 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d","status":"affected"}]}],"references":["https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc","https://github.com/GreycLab/CImg/issues/478","https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d","https://github.com/GreycLab/CImg/releases/tag/v.3.7.5"],"weaknesses":["CWE-190"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/42xxx/CVE-2026-42144.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-42144","state":"PUBLISHED","datePublished":"2026-05-04T17:51:38.144Z","dateUpdated":"2026-05-05T14:14:38.921Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-04-24T17:15:21.834Z"},"containers":{"cna":{"title":"CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)","descriptions":[{"lang":"en","value":"CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the W*H*D size computation inside _load_pnm() that can bypass the memory allocation guard. A crafted PNM/PGM/PPM file with large dimension values causes the overflow to wrap around, allocating an undersized buffer and potentially triggering a heap buffer overflow. Any application using CImg to load untrusted image files is affected. This issue has been patched via commit 4ca26bc."}],"affected":[{"vendor":"GreycLab","product":"CImg","versions":[{"version":"< 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d","status":"affected"}]}],"references":[{"url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc","name":"https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/GreycLab/CImg/issues/478","name":"https://github.com/GreycLab/CImg/issues/478","tags":["x_refsource_MISC"]},{"url":"https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d","name":"https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d","tags":["x_refsource_MISC"]},{"url":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5","name":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":6.1,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-190","lang":"en","description":"CWE-190: Integer Overflow or Wraparound","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-05-04T17:51:38.144Z"},"source":{"advisory":"GHSA-4663-63fm-44gc","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-05T13:07:54.801471Z","id":"CVE-2026-42144","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-05T14:14:38.921Z"}}]}}}