What’s Vulnerable › Vulnerabilities
CVE-2026-118752: FreeImage before 3.19.22 Heap Buffer Overflow via IFF/LBM PBM RLE Decoder
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-10-28 · updated 2026-10-28
- Weakness: CWE-787
Description
FreeImage (danoli3 fork) before 3.19.22 contains a heap buffer overflow vulnerability in the PBM RLE decoder of PluginIFF.cpp that lacks bounds checks on ByteRun1 runs. Attackers can supply a crafted IFF/LBM PBM file with runs straddling scanline ends to write up to 127 controlled bytes past the heap-allocated bitmap.
Affected products
- danoli3 FreeImage: before 3.19.22 — fixed in 3.19.22
- FreeImage: through 3.18.0
How to fix
Upgrade to a fixed version: danoli3 FreeImage 3.19.22. Check the vendor advisory for mitigations.
References
- https://github.com/danoli3/FreeImage
- https://github.com/danoli3/FreeImage/blob/3.19.21/Source/FreeImage/PluginIFF.cpp#L296-L324
- https://github.com/danoli3/FreeImage/commit/cf173c16354274dc8fb739dc395fc7f32efe7d45
- https://github.com/danoli3/FreeImage/commit/e1105d3b464b679f0525c6178d9ccf49d55cf712
- https://github.com/danoli3/FreeImage/issues/156
- https://github.com/danoli3/FreeImage/pull/161
- https://github.com/danoli3/FreeImage/releases/tag/3.19.22
- https://www.vulncheck.com/advisories/freeimage-before-3.19.22-heap-buffer-overflow-via-iff-lbm-pbm-rle-decoder
Get alerted when CVE-2026-118752 or the next vulnerability affects your stack