CVE-2025-57803 Details
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.
A heap buffer overflow vulnerability has been identified in ImageMagick's BMP encoder, specifically in 32-bit builds prior to versions 6.9.13-28 and 7.1.2-2. The issue arises from a 32-bit integer overflow in the scanline-stride computation for 24-bits per pixel images. This overflow causes the 'bytes_per_line' (stride) to collapse to a very small value, while the encoder still writes 3 times the image width in bytes. As a result, the first row of the image overwrites its allocated space and encroaches into adjacent heap memory, using bytes controlled by the attacker. This vulnerability creates a classic heap corruption scenario, particularly in automated image processing pipelines that convert or generate thumbnails.
Users should update to ImageMagick versions 6.9.13-28 or 7.1.2-2. For those using the C/C++ library, ensure that the version is 7.1.2-2 or later.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 24, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-122 | Heap-based Buffer Overflow | [email protected] |
| CWE-190 | Integer Overflow or Wraparound | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| imagemagick imagemagick | < 6.9.13-28 >= 7.0.0-0, < 7.1.2-2 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 3, 2025 | CVE Modified | CVE |
| Sep 2, 2025 | Initial Analysis | [email protected] |
| Aug 26, 2025 | CVE Modified | CISA-ADP |
| Aug 26, 2025 | New CVE Received | [email protected] |