CVE-2026-42144

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

MEDIUM
6.1
CVSS Score
Published: May 4, 2026 at 05:51 PM UTC
Updated: October 26, 2026 at 07:10 PM UTC
1 product affected across 1 vendorCImg

Using CImg by GreycLab?

Get instant alerts when new vulnerabilities affect CImg - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 0.1%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

< 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

6.1MEDIUMGitHub_M
Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
HIGH
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-190

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card