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.
Metrics
Affected Vendors & Products
References
History
Mon, 04 May 2026 18:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm) | |
| Weaknesses | CWE-190 | |
| References |
| |
| Metrics |
cvssV3_1
|
Status: PUBLISHED
Assigner: GitHub_M
Published:
Updated: 2026-05-04T17:51:38.144Z
Reserved: 2026-04-24T17:15:21.834Z
Link: CVE-2026-42144
No data.
Status : Received
Published: 2026-05-04T18:16:31.830
Modified: 2026-05-04T18:16:31.830
Link: CVE-2026-42144
No data.
OpenCVE Enrichment
Updated: 2026-05-04T19:30:02Z