Every CVE Search/ Get API key

CVE-2026-42144

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

6.1 MediumFix available

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
High

Exploit likelihood

0.14%Up 0.1 points since May 5, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.1

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

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Record
CVE-2026-42144
CVSS 3.1
6.1 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Weakness
CWE-190
Updated
2026-11-02
EUVDEUVD-2026-27075 6.1

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Record
EUVD-2026-27075
CVSS 3.1
6.1 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Updated
2026-11-02
NVD 6.1

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Record
CVE-2026-42144
CVSS 3.1
6.1 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Weakness
CWE-190
Updated
2026-11-02
OSV 6.1

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

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Record
CVE-2026-42144
CVSS 3.1
6.1 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVDEBIAN-CVE-2026-42144 6.1

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Record
DEBIAN-CVE-2026-42144
CVSS 3.1
6.1 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2026-42144 6.1

CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the WHD 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.

Record
UBUNTU-CVE-2026-42144
CVSS 3.1
6.1 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
cimg
Debian:12
All versions, plus listed versions
3.2.1+dfsg-13.2.1+dfsg-23.5.0+dfsg-13.5.2+dfsg-13.5.2+dfsg-24.0.4+dfsg-1
None known
cimg
Debian:13
before 3.5.2+dfsg-1+deb13u1, plus listed versions
3.5.2+dfsg-1
3.5.2+dfsg-1+deb13u1
cimg
Debian:14
before 3.5.2+dfsg-2, plus listed versions
3.5.2+dfsg-1
3.5.2+dfsg-2
cimg
Ubuntu:16.04:LTS
All versions, plus listed versions
1.6.4+dfsg-1build11.6.5+dfsg-1
None known
cimg
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.7.9+dfsg-21.7.9+dfsg-2build11.7.9+dfsg-2ubuntu0.18.04.11.7.9+dfsg-2ubuntu0.18.04.21.7.9+dfsg-2ubuntu0.18.04.2+esm1
None known
cimg
Ubuntu:20.04:LTS
All versions, plus listed versions
2.4.5+dfsg-1
None known
cimg
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
2.9.4+dfsg-22.9.4+dfsg-32.9.4+dfsg-3ubuntu0.1~esm1
None known
cimg
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
3.2.1+dfsg-13.2.1+dfsg-1ubuntu0.24.04.1~esm1
None known
cimg
Ubuntu:25.10
All versions, plus listed versions
3.5.2+dfsg-1
None known
cimg
Ubuntu:26.10
All versions, plus listed versions
3.5.2+dfsg-1build13.5.2+dfsg-2
None known
cimg
Ubuntu:26.04:LTS
All versions, plus listed versions
3.5.2+dfsg-13.5.2+dfsg-1build1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-42144 is a medium vulnerability (CVSS 6.1) in Greyclab Cimg, published May 4, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.14%, the 3rd percentile. Fixed in cimg 3.5.2+dfsg-1+deb13u1.

References

MoveEnter Open