# CVE-2026-42144: CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-05-04T17:51:38.144Z
- Modified: 2026-10-26T19:10:00.163Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- GreycLab CImg: < 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d

## References

- <https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc>
- <https://github.com/GreycLab/CImg/issues/478>
- <https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d>
- <https://github.com/GreycLab/CImg/releases/tag/v.3.7.5>

## Sources

- CVE List: [CVE-2026-42144](https://www.cve.org/CVERecord?id=CVE-2026-42144), CVE Terms of Use, modified 2026-05-05
- NVD: [CVE-2026-42144](https://nvd.nist.gov/vuln/detail/CVE-2026-42144), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-42144 · Whole record: https://cve.day/CVE-2026-42144.json · Rebuilt by cve.day 2026-11-25T22:59:20.544Z
