Description
CImg through 4.0.6 contains a heap out-of-bounds read vulnerability in the _load_bmp() function of CImg.h caused by an integer overflow in the row byte count. Attackers can supply a crafted BMP file with a large header width that wraps dx_bytes, causing crashes or heap memory disclosure into the decoded image.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| GreycLab | CImg | ≤ 4.0.6 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | cimg | No fix yet | — |
| Debian 13 | cimg | No fix yet | — |
| Debian 12 | cimg | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | cimg | No fix yet | — |
| Ubuntu 26.04 LTS | cimg | No fix yet | — |
| Ubuntu 20.04 LTS | cimg | No fix yet | — |
| Ubuntu 16.04 LTS | cimg | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | cimg | No fix yet | — |
| Ubuntu Pro 22.04 LTS | cimg | No fix yet | — |
| Ubuntu Pro 18.04 LTS | cimg | No fix yet | — |
References
- GitHub Issue #495 issue-tracking
- https://github.com/GreycLab/CImg product
- https://github.com/GreycLab/CImg/commit/b9ed613d9984f9caa1617b97e1db7e429cf14fd5 patch
- https://github.com/GreycLab/CImg/blob/v.4.0.6/CImg.h#L55659 technical-description
- VulnCheck Advisory: GreycLab CImg through 4.0.6 Heap Out-of-Bounds Read via Integer Overflow in _load_bmp() third-party-advisory