CVE-2026-42144CWE-190

CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)

Medium · published May 4, 2026

CVSS v3.1
6.1
EPSS
0%
Percentile
9.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
6.1 · MEDIUM
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
CVSS v4.0
Not supplied
EPSS
0.00201 · 9.5th percentile
Weakness
CWE-190 · Integer Overflow or Wraparound
Published
2026-05-04T17:51Z
EPSS history
Timeline
  • 04 MAY 17:51Z
    CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)
    cvelistv5