CVE-2025-57803
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-28 and 7.1.2-2 for ImageMagick's 32-bit build, a 32-bit integer overflow in the BMP encoder’s scanline-stride computation collapses bytes_per_line (stride) to a tiny value while the per-row writer still emits 3 × width bytes for 24-bpp images. The row base pointer advances using the (overflowed) stride, so the first row immediately writes past its slot and into adjacent heap memory with attacker-controlled bytes. This is a classic, powerful primitive for heap corruption in common auto-convert pipelines. This issue has been patched in versions 6.9.13-28 and 7.1.2-2.
How to fix
- imagemagick imagemagick6.9.13-28, 7.1.2-2 or later
- Magick.NET-Q16-AnyCPU14.8.1 or later
- Magick.NET-Q16-HDRI-AnyCPU14.8.1 or later
- Magick.NET-Q16-HDRI-x8614.8.1 or later
- Magick.NET-Q16-x8614.8.1 or later
- Magick.NET-Q8-AnyCPU14.8.1 or later
- Magick.NET-Q8-x8614.8.1 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| imagemagick imagemagick | v < 6.9.13-28, 7.0.0-0 ≤ v < 7.1.2-2 | 6.9.13-28, 7.1.2-2 |
| Magick.NET-Q16-AnyCPUNuGet | v < 14.8.1 | 14.8.1 |
| Magick.NET-Q16-HDRI-AnyCPUNuGet | v < 14.8.1 | 14.8.1 |
| Magick.NET-Q16-HDRI-x86NuGet | v < 14.8.1 | 14.8.1 |
| Magick.NET-Q16-x86NuGet | v < 14.8.1 | 14.8.1 |
| Magick.NET-Q8-AnyCPUNuGet | v < 14.8.1 | 14.8.1 |
| Magick.NET-Q8-x86NuGet | v < 14.8.1 | 14.8.1 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.