{"id":"CVE-2026-42144","aliases":["DEBIAN-CVE-2026-42144","EUVD-2026-27075","GHSA-4663-63fm-44gc","UBUNTU-CVE-2026-42144"],"status":"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.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00142,"percentile":0.03585,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-190"],"published":"2026-05-04T17:51:38Z","modified":"2026-10-28T11:13:24Z","fixes":[{"ecosystem":"Debian:13","package":"cimg","fixed_in":["3.5.2+dfsg-1+deb13u1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"cimg","fixed_in":["3.5.2+dfsg-2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.2.1+dfsg-1","3.2.1+dfsg-2","3.5.0+dfsg-1","3.5.2+dfsg-1","3.5.2+dfsg-2","4.0.4+dfsg-1"]},{"source":"osv","ecosystem":"Debian:13","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.2+dfsg-1+deb13u1"}]}],"versions":["3.5.2+dfsg-1"]},{"source":"osv","ecosystem":"Debian:14","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.2+dfsg-2"}]}],"versions":["3.5.2+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6.4+dfsg-1build1","1.6.5+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.9+dfsg-2","1.7.9+dfsg-2build1","1.7.9+dfsg-2ubuntu0.18.04.1","1.7.9+dfsg-2ubuntu0.18.04.2","1.7.9+dfsg-2ubuntu0.18.04.2+esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.4.5+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.9.4+dfsg-2","2.9.4+dfsg-3","2.9.4+dfsg-3ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.2.1+dfsg-1","3.2.1+dfsg-1ubuntu0.24.04.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.5.2+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.5.2+dfsg-1build1","3.5.2+dfsg-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"cimg","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.5.2+dfsg-1","3.5.2+dfsg-1build1"]}],"products":[{"vendor":"greyclab","product":"cimg"}],"references":[{"url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc","tags":["x_refsource_CONFIRM","advisory","report"]},{"url":"https://github.com/GreycLab/CImg/issues/478","tags":["x_refsource_MISC","report"]},{"url":"https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/GreycLab/CImg/releases/tag/v.3.7.5","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42144.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42144","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-42144","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-42144","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-42144","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-42144","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.","status":"published","published":"2026-05-04T17:51:38.144Z","modified":"2026-05-05T14:14:38.921Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T13:40:35.004553Z"}],"euvd":[{"id":"EUVD-2026-27075","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.","status":"published","published":"2026-05-04T17:51:38Z","modified":"2026-05-05T14:14:38Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium"}],"updated_at":"2026-11-02T19:05:17.068199Z"}],"nvd":[{"id":"CVE-2026-42144","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.","status":"published","published":"2026-05-04T18:16:31.83Z","modified":"2026-10-26T19:10:00.163Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium","assessor":"secondary"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:12:17.022502Z"}],"osv":[{"id":"CVE-2026-42144","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.","status":"published","published":"2026-05-04T17:51:38.144Z","modified":"2026-10-28T11:13:24.770071845Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T15:45:04.117819Z"},{"id":"DEBIAN-CVE-2026-42144","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.","status":"published","published":"2026-05-04T18:16:31.83Z","modified":"2026-10-27T09:47:31.091839588Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:54.892385Z"},{"id":"UBUNTU-CVE-2026-42144","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.","status":"published","published":"2026-05-04T18:16:00Z","modified":"2026-10-17T13:00:04.74777941Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H","level":"medium"}],"updated_at":"2026-11-02T16:56:18.393417Z"}]}}
