CVE-2026-42144
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.
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
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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
cimgDebian: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 |
cimgDebian:13 |
before 3.5.2+dfsg-1+deb13u1, plus listed versions 3.5.2+dfsg-1 |
3.5.2+dfsg-1+deb13u1 |
cimgDebian:14 |
before 3.5.2+dfsg-2, plus listed versions 3.5.2+dfsg-1 |
3.5.2+dfsg-2 |
cimgUbuntu:16.04:LTS |
All versions, plus listed versions 1.6.4+dfsg-1build11.6.5+dfsg-1 |
None known |
cimgUbuntu: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 |
cimgUbuntu:20.04:LTS |
All versions, plus listed versions 2.4.5+dfsg-1 |
None known |
cimgUbuntu: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 |
cimgUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 3.2.1+dfsg-13.2.1+dfsg-1ubuntu0.24.04.1~esm1 |
None known |
cimgUbuntu:25.10 |
All versions, plus listed versions 3.5.2+dfsg-1 |
None known |
cimgUbuntu:26.10 |
All versions, plus listed versions 3.5.2+dfsg-1build13.5.2+dfsg-2 |
None known |
cimgUbuntu:26.04:LTS |
All versions, plus listed versions 3.5.2+dfsg-13.5.2+dfsg-1build1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE 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
github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc
github.com/GreycLab/CImg/issues/478
github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d
github.com/GreycLab/CImg/releases/tag/v.3.7.5
github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42144.json
nvd.nist.gov/vuln/detail/CVE-2026-42144
security-tracker.debian.org/tracker/CVE-2026-42144
ubuntu.com/security/CVE-2026-42144
cve.org/CVERecord?id=CVE-2026-42144