
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
- Severity
- High · CVSS 7.5
CVSS: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.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | cimg | sid | 4.0.4+dfsg-1 | fixed |
| Debian | cimg | forky | 4.0.4+dfsg-1 | fixed |
| Debian | cimg | trixie | 3.5.2+dfsg-1+deb13u1 | vulnerable |
| Debian | cimg | bookworm | 3.2.1+dfsg-1 | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | cimg | source | sid | 4.0.4+dfsg-1 | not yet assigned | Not reported | [1142677] |
| Debian | cimg | source | forky | 4.0.4+dfsg-1 | not yet assigned | Not reported | [1142677] |
| Debian | cimg | source | trixie | (unfixed) | not yet assigned | Not reported | [1142677] |
| Debian | cimg | source | bookworm | (unfixed) | not yet assigned | Not reported | [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 · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
- [cimg-doc]Affected
Source package: [cimg]
Details (2)
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
- [cimg-examples]Affected
Source package: [cimg]
Details (2)
3.2.1+dfsg-1· all · bookwormAffected
nvd · cimg · debian · bookworm; nvd · cimg · debian · 12
3.2.1+dfsg-1· all · bookwormAffected
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 · trixieAffected
nvd · cimg · debian · 13
3.5.2+dfsg-1+deb13u1· all · trixieAffected
nvd · cimg · debian · 13
- [cimg-doc]Affected
Source package: [cimg]
Details (2)
3.5.2+dfsg-1+deb13u1· all · trixieAffected
nvd · cimg · debian · 13
3.5.2+dfsg-1+deb13u1· all · trixieAffected
nvd · cimg · debian · 13
- [cimg-examples]Affected
Source package: [cimg]
Details (2)
3.5.2+dfsg-1+deb13u1· all · trixieAffected
nvd · cimg · debian · 13
3.5.2+dfsg-1+deb13u1· all · trixieAffected
nvd · cimg · debian · 13
Observed:
References
- [https://github.com/GreycLab/CImg/commit/6a69bf725ffd111a4c7dc61cc15e3661abd158ee]
- [https://github.com/GreycLab/CImg/issues/480]
- [https://github.com/GreycLab/CImg/security/advisories/GHSA-rmfc-grgj-qwhv]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-47667]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-47667]
- [https://security-tracker.debian.org/tracker/CVE-2026-47667]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-47667.json]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]