ImageMagick vulnerable to denial of service via integer overflow in BMP decoder on 32-bit systems
Description
ImageMagick is an open source software suite for displaying, converting, and editing raster image files. In ImageMagick versions prior to 7.1.2-7 and 6.9.13-32, an integer overflow vulnerability exists in the BMP decoder on 32-bit systems. The vulnerability occurs in coders/bmp.c when calculating the extent value by multiplying image columns by bits per pixel. On 32-bit systems with size_t of 4 bytes, a malicious BMP file with specific dimensions can cause this multiplication to overflow and wrap to zero. The overflow check added to address CVE-2025-57803 is placed after the overflow occurs, making it ineffective. A specially crafted 58-byte BMP file with width set to 536,870,912 and 32 bits per pixel can trigger this overflow, causing the bytes_per_line calculation to become zero. This vulnerability only affects 32-bit builds of ImageMagick where default resource limits for width, height, and area have been manually increased beyond their defaults. 64-bit systems with size_t of 8 bytes are not vulnerable, and systems using default ImageMagick resource limits are not vulnerable. The vulnerability is fixed in versions 7.1.2-7 and 6.9.13-32.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Integer overflow in ImageMagick BMP decoder on 32-bit systems allows denial of service via crafted BMP file; fixed in versions 7.1.2-7 and 6.9.13-32.
Vulnerability
An integer overflow vulnerability exists in ImageMagick's BMP decoder (coders/bmp.c) on 32-bit systems. The bug occurs when calculating the extent value by multiplying image columns by bits per pixel. On 32-bit systems with size_t of 4 bytes, a malicious BMP file with specific dimensions (e.g., width 536,870,912 and 32 bits per pixel) causes this multiplication to overflow and wrap to zero [2][3]. This results in a bytes_per_line calculation of zero, leading to insufficient memory allocation.
Exploitation
Exploitation requires a 32-bit build of ImageMagick where default resource limits for width, height, and area have been manually increased beyond their defaults [2][3]. A specially crafted 58-byte BMP file can trigger the overflow. The patch originally added for CVE-2025-57803 (BMPOverflowCheck) is ineffective because it checks the result of the multiplication after the overflow has already occurred [2].
Impact
Successful exploitation can cause a denial of service, including AddressSanitizer crashes, as the zero bytes_per_line leads to improper memory access [2]. 64-bit systems with size_t of 8 bytes are not vulnerable, and systems using default resource limits are not affected.
Mitigation
The vulnerability is fixed in ImageMagick versions 7.1.2-7 and 6.9.13-32 [2][3]. The fix corrects the overflow check placement. Users of 32-bit systems with custom resource limits should update immediately. Magick.NET released version 14.9.0 incorporating the fix [4].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
Magick.NET-Q16-AnyCPUNuGet | < 14.9.0 | 14.9.0 |
Magick.NET-Q16-HDRI-AnyCPUNuGet | < 14.9.0 | 14.9.0 |
Magick.NET-Q16-HDRI-x86NuGet | < 14.9.0 | 14.9.0 |
Magick.NET-Q16-x86NuGet | < 14.9.0 | 14.9.0 |
Magick.NET-Q8-AnyCPUNuGet | < 14.9.0 | 14.9.0 |
Magick.NET-Q8-x86NuGet | < 14.9.0 | 14.9.0 |
Affected products
2<=7.1.2-6, <=6.9.13-31+ 1 more
- (no CPE)range: <=7.1.2-6, <=6.9.13-31
- (no CPE)range: < 6.9.13-32
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
6- github.com/advisories/GHSA-9pp9-cfwx-54rmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-62171ghsaADVISORY
- github.com/ImageMagick/ImageMagick/commit/cea1693e2ded51b4cc91c70c54096cbed1691c00ghsax_refsource_MISCWEB
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9pp9-cfwx-54rmghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.9.0ghsaWEB
- lists.debian.org/debian-lts-announce/2025/10/msg00019.htmlghsaWEB
News mentions
0No linked articles in our index yet.