Integer overflow in Greyclab Cimg

CVE-2026-42144

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.

Vulnerability class: Integer Overflow

Published · last modified .

CVSS v3 metric

CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H.

EPSS exploit prediction

EPSS: 0.002 (9.5th percentile), scored .

Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 9th percentile — 9.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2026-42144: held from 0.001 to 0.002.

EPSS over last 30 days · oldest: 0.001 · newest: 0.002 · change: +0.001

Affected products

  • Greyclab Cimg — versions < 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-42144?
CVE-2026-42144 is a medium-severity vulnerability in Greyclab Cimg, classified under Integer Overflow or Wraparound. CVSS score: 6.1/10. Published 2026-05-04.
How severe is CVE-2026-42144?
Medium severity. CVSS v3 base score is 6.1 out of 10.