CVE catalog

CVE-2026-47667

CImg Library is a C++ library for image processing. Prior to version 4.0.0 in `_load_analyze()`, the header_size field is read as an `unsigned int` from the first 4 bytes of an Analyze/NIfTI file and

[CVE catalog]

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

CImg Library is a C++ library for image processing. Prior to version 4.0.0 in `_load_analyze()`, the header_size field is read as an `unsigned int` from the first 4 bytes of an Analyze/NIfTI file and passed directly to `new unsigned char[header_size]` without being bounded against the actual file size. A value up to ~4 GB is accepted. If the subsequent `fread` returns `short` as it will for any malformed file), the function throws a `CImgIOException` and the allocated buffer is never freed. A 6-byte crafted file is sufficient to trigger an allocation of ~1.3 GB per call, with the full allocation leaked on every error path. The issue is reachable via `load_analyze()` and the generic `load()` when the file extension is .hdr, .img, or .nii. Version 4.0.0 fixes the issue.

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+deb13u1vulnerable
Debiancimgbookworm3.2.1+dfsg-1vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiancimgsourcesid4.0.4+dfsg-1not yet assignedNot reported[1142677]
Debiancimgsourceforky4.0.4+dfsg-1not yet assignedNot reported[1142677]
Debiancimgsourcetrixie(unfixed)not yet assignedNot reported[1142677]
Debiancimgsourcebookworm(unfixed)not yet assignedNot reported[1142677]

[Debian bug #1142677]

Notes

[trixie] cimg: Minor issue [bookworm] cimg: minor issue; DoS

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]Affected

    Source package: [cimg]

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

      Affected

      nvd · cimg · debian · 13

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

      Affected

      nvd · cimg · debian · 13

  • [cimg-doc]Affected

    Source package: [cimg]

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

      Affected

      nvd · cimg · debian · 13

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

      Affected

      nvd · cimg · debian · 13

  • [cimg-examples]Affected

    Source package: [cimg]

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

      Affected

      nvd · cimg · debian · 13

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

      Affected

      nvd · cimg · debian · 13

Observed:

References