CVE catalog

CVE-2026-42144

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 allo

[CVE catalog]

Severity
High · CVSS 8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.14% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiancimgsid4.0.4+dfsg-1fixed
Debiancimgforky4.0.4+dfsg-1fixed
Debiancimgtrixie3.5.2+dfsg-1+deb13u1fixed
Debiancimgbookworm3.2.1+dfsg-1vulnerable
CpecimgNot reportedNot reportedvulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiancimgsourcesid3.5.2+dfsg-2not yet assignedNot reported[1135778]
Debiancimgsourceforky3.5.2+dfsg-2not yet assignedNot reported[1135778]
Debiancimgsourcetrixie3.5.2+dfsg-1+deb13u1not yet assignedNot reported[1135778]
Debiancimgsourcebookworm(unfixed)not yet assignedNot reported[1135778]

[Debian bug #1135778]

Notes

[bookworm] cimg: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [cimg-dev]Affected

    Source package: [cimg]

    Details (2)
    • 3.2.1+dfsg-1 · all · bookworm

      Affected

      nvd · cimg · debian · bookworm; nvd · cimg · debian · 12

    • 3.2.1+dfsg-1 · all · bookworm

      Affected

      nvd · cimg · debian · bookworm; nvd · cimg · debian · 12

  • [cimg-doc]Affected

    Source package: [cimg]

    Details (2)
    • 3.2.1+dfsg-1 · all · bookworm

      Affected

      nvd · cimg · debian · bookworm; nvd · cimg · debian · 12

    • 3.2.1+dfsg-1 · all · bookworm

      Affected

      nvd · cimg · debian · bookworm; nvd · cimg · debian · 12

  • [cimg-examples]Affected

    Source package: [cimg]

    Details (2)
    • 3.2.1+dfsg-1 · all · bookworm

      Affected

      nvd · cimg · debian · bookworm; nvd · cimg · debian · 12

    • 3.2.1+dfsg-1 · all · bookworm

      Affected

      nvd · cimg · debian · bookworm; nvd · cimg · debian · 12

[Debian 13 (Trixie)]

  • [cimg-dev]Fixed

    Source package: [cimg]

    Details (2)
    • 3.5.2+dfsg-1+deb13u1 · all · trixie

      Fixed · Fixed: 3.5.2+dfsg-1+deb13u1

      nvd · cimg · debian · 13

    • 3.5.2+dfsg-1+deb13u1 · all · trixie

      Fixed · Fixed: 3.5.2+dfsg-1+deb13u1

      nvd · cimg · debian · 13

  • [cimg-doc]Fixed

    Source package: [cimg]

    Details (2)
    • 3.5.2+dfsg-1+deb13u1 · all · trixie

      Fixed · Fixed: 3.5.2+dfsg-1+deb13u1

      nvd · cimg · debian · 13

    • 3.5.2+dfsg-1+deb13u1 · all · trixie

      Fixed · Fixed: 3.5.2+dfsg-1+deb13u1

      nvd · cimg · debian · 13

  • Source package: [cimg]

    Details (2)
    • 3.5.2+dfsg-1+deb13u1 · all · trixie

      Fixed · Fixed: 3.5.2+dfsg-1+deb13u1

      nvd · cimg · debian · 13

    • 3.5.2+dfsg-1+deb13u1 · all · trixie

      Fixed · Fixed: 3.5.2+dfsg-1+deb13u1

      nvd · cimg · debian · 13

Observed:

References