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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.00%, higher than 63% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-08-26T16:07:27.000Z
- Modified: 2026-06-17T09:43:27.917Z
- Also known as: GHSA-mxvv-97wh-cfmm
- Weaknesses: CWE-122, CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- ImageMagick ImageMagick: < 7.1.2-2; < 6.9.13-28; before 6.9.13-28; from 7.0.0-0 before 7.1.2-2
- Magick.NET-Q16-AnyCPU (NuGet): before 14.8.1
- Magick.NET-Q16-HDRI-AnyCPU (NuGet): before 14.8.1
- Magick.NET-Q16-HDRI-x86 (NuGet): before 14.8.1
- Magick.NET-Q16-x86 (NuGet): before 14.8.1
- Magick.NET-Q8-AnyCPU (NuGet): before 14.8.1
- Magick.NET-Q8-x86 (NuGet): before 14.8.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmm> (exploit, vendor-advisory, web)
- <https://github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7> (patch, web)
- <https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1> (release-notes, web)
- <https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-57803> (advisory)
- <https://github.com/ImageMagick/ImageMagick> (package)

## Sources

- CVE List: [CVE-2025-57803](https://www.cve.org/CVERecord?id=CVE-2025-57803), CVE Terms of Use, modified 2026-02-26
- GitHub Advisory Database: [GHSA-mxvv-97wh-cfmm](https://github.com/advisories/GHSA-mxvv-97wh-cfmm), CC-BY-4.0, modified 2025-11-03
- NVD: [CVE-2025-57803](https://nvd.nist.gov/vuln/detail/CVE-2025-57803), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-57803 · Whole record: https://cve.day/CVE-2025-57803.json · Rebuilt by cve.day 2026-11-25T22:59:03.707Z
