{"id":"CVE-2026-42144","summary":"CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)","details":"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.","aliases":["GHSA-4663-63fm-44gc"],"modified":"2026-07-15T01:49:21.574738491Z","published":"2026-05-04T17:51:38.144Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-190"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42144.json","unresolved_ranges":[{"source":"AFFECTED_FIELD","extracted_events":[{"fixed":"4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d"}]}]},"references":[{"type":"WEB","url":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42144.json"},{"type":"ADVISORY","url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42144"},{"type":"REPORT","url":"https://github.com/GreycLab/CImg/issues/478"},{"type":"FIX","url":"https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/greyclab/cimg","events":[{"introduced":"0"},{"fixed":"4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d"},{"fixed":"63ad0902bc0b3b3e82e30d8ac3e5135937bac0c0"}],"database_specific":{"source":"REFERENCES"}}],"versions":["v.3.7.4","v.3.7.3","v.3.7.2","v.3.7.1","v.3.7.0","v.3.6.6","v.3.6.5","v.3.6.4","v.3.6.3","v.3.6.2","v.3.6.1","v.3.6.0","v.3.5.5","v.3.5.4","v.3.5.3","v.3.5.2","v.3.5.1","v.3.5.0","v.3.4.3","v.3.4.2","v.3.4.1","v.3.4.0","v.3.3.6","v.3.3.5","v.3.3.4","v.3.3.3","v.3.3.2","v.3.3.1","v.3.3.0","v.3.2.6","v.3.2.5","v.3.2.4","v.3.2.3","v.3.2.2","v.3.2.1","v.3.2.0","v.3.1.6","v.3.1.4","v.3.1.3","v.3.1.2","v.3.1.1","v.3.1.0","v.2.9.0","v.2.8.4","v.2.8.3","v.2.8.2","v.2.8.1","v.2.8.0","v.2.7.5","v.2.7.4","v.2.7.3","v.2.7.2","v.2.7.1","v.2.7.0","v.2.6.7","v.2.6.6","v.2.6.5","v.2.6.4","v.2.6.3","v.2.6.2","v.2.6.1","v.2.6.0","v.2.5.7","v.2.5.6","v.2.5.5","v.2.5.4","v.2.5.3","v.2.5.2","v.2.5.1","v.2.5.0","v.2.4.5","v.2.4.4","v.2.4.3","v.2.4.2","v.2.4.1","v.2.4.0","v.2.3.6","v.2.3.5","v.2.3.4","v.2.3.3","v.2.3.2","v.2.3.1","v.2.3.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42144.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H"}]}