Integer Overflow or Wraparound Affecting cimg package, versions <3.5.2+dfsg-1+deb13u1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.14% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-CIMG-18291410
  • published24 Jul 2026
  • disclosed4 May 2026

Introduced: 4 May 2026

CVE-2026-42144  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade Echo:latest cimg to version 3.5.2+dfsg-1+deb13u1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream cimg package and not the cimg package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

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.