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

Published May 4, 2026
·
Updated

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 loadpnm() 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.

Affected Software

1 affected component
CImg CImg Library<4ca26bc

Event History

May 4, 2026
CVE Published
via MITRE·05:51 PM
Data Sourced
via MITRE·05:51 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42144?

The CVE-2026-42144 vulnerability is considered to have a medium severity due to its potential to bypass memory allocation guards.

2

How do I fix CVE-2026-42144?

To fix CVE-2026-42144, update the CImg Library to a version that includes commit 4ca26bc or later.

3

What type of vulnerability is CVE-2026-42144?

CVE-2026-42144 is an integer overflow vulnerability that affects the image size computation in the _load_pnm function.

4

Who is affected by CVE-2026-42144?

CVE-2026-42144 affects users of the CImg Library versions prior to commit 4ca26bc.

5

What is the potential impact of CVE-2026-42144?

The potential impact of CVE-2026-42144 includes memory corruption and possible exploitation that could affect application stability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203