# CVE-2025-57803: ImageMagick (WriteBMPImage): 32-bit integer overflow when writing BMP scanline stride → heap buffer overflow

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 6.9.13-28, 7.1.2-2 (CNA); fix release not confirmed
- Status: published
- Published: 2025-08-26 · Modified: 2026-02-26
- Aliases: RHSA-2025:16313, UBUNTU-CVE-2025-57803, DEBIAN-CVE-2025-57803, GHSA-mxvv-97wh-cfmm, ALPINE-CVE-2025-57803
- Record: https://cvemate.com/vulnerability/CVE-2025-57803 · JSON: https://cvemate.com/vulnerability/CVE-2025-57803/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 1.002%, percentile 64.021%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine imagemagick (Alpine Linux): ≥ 7.0.0-0, \< 7.1.2.8-r0 \| \< 7.1.2.8-r0
- debian imagemagick (Debian): \< 8:6.9.11.60+dfsg-1.6+deb12u4 \| \< 8:7.1.1.43+dfsg1-1+deb13u2 \| \< 8:7.1.2.3+dfsg1-1
- ubuntu imagemagick (Ubuntu): \< 8:6.7.7.10-6ubuntu3.13+esm15 \| \< 8:6.8.9.9-7ubuntu5.16+esm14 \| \< 8:6.9.7.4+dfsg-16ubuntu6.15+esm6 \| \< 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm4 \| \< 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm4 \| \< 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm3
- imagemagick imagemagick: \< 7.1.2-2 \| \< 6.9.13-28 \| ≥ 7.0.0-0, \< 7.1.2-2
- NuGet Magick.NET-Q16-AnyCPU (NuGet): \< 14.8.1
- NuGet Magick.NET-Q16-HDRI-AnyCPU (NuGet): \< 14.8.1
- NuGet Magick.NET-Q16-HDRI-x86 (NuGet): \< 14.8.1
- NuGet Magick.NET-Q16-x86 (NuGet): \< 14.8.1
- NuGet Magick.NET-Q8-AnyCPU (NuGet): \< 14.8.1
- NuGet Magick.NET-Q8-x86 (NuGet): \< 14.8.1
- redhat ImageMagick (Red Hat): \< 0:6.9.10.68-9.el7\_9
- redhat ImageMagick-c++ (Red Hat): \< 0:6.9.10.68-9.el7\_9
- redhat ImageMagick-c++-devel (Red Hat): \< 0:6.9.10.68-9.el7\_9
- redhat ImageMagick-debuginfo (Red Hat): \< 0:6.9.10.68-9.el7\_9
- redhat ImageMagick-devel (Red Hat): \< 0:6.9.10.68-9.el7\_9
- redhat ImageMagick-doc (Red Hat): \< 0:6.9.10.68-9.el7\_9
- redhat ImageMagick-perl (Red Hat): \< 0:6.9.10.68-9.el7\_9

## References

- <https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmm>
- <https://github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7>
- <https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1>
- <https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html>
- <https://access.redhat.com/errata/RHSA-2025:16313>
- <https://access.redhat.com/security/updates/classification/#important>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2391093>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2025/rhsa-2025_16313.json>
- <https://access.redhat.com/security/cve/CVE-2025-57803>
- <https://www.cve.org/CVERecord?id=CVE-2025-57803>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-57803>
- <https://ubuntu.com/security/CVE-2025-57803>
- <https://github.com/ImageMagick/ImageMagick6/commit/e49c68c88eed6e68145480a471650daa9ed87217>
- <https://ubuntu.com/security/notices/USN-7812-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-57803>
- <https://github.com/ImageMagick/ImageMagick>
- <https://security.alpinelinux.org/vuln/CVE-2025-57803>

---

Data as of 2026-12-05T09:11:20.719Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
