Miggo Logo

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

7.5

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
8/26/2025
Updated
8/26/2025
KEV Status
No
Technology
TechnologyC#

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
Magick.NET-Q16-AnyCPUnuget< 14.8.114.8.1
Magick.NET-Q16-HDRI-AnyCPUnuget< 14.8.114.8.1
Magick.NET-Q16-HDRI-x86nuget< 14.8.114.8.1
Magick.NET-Q16-x86nuget< 14.8.114.8.1
Magick.NET-Q8-AnyCPUnuget< 14.8.114.8.1
Magick.NET-Q8-x86nuget< 14.8.114.8.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability analysis is based on the detailed description provided, which includes the root cause, a demonstration of the vulnerability, and an ASan log. The vulnerability is a heap-based buffer overflow in the WriteBMPImage function in coders/bmp.c, caused by an integer overflow when calculating the bytes_per_line for a BMP image. The provided commit 2c55221f4d38193adcb51056c14cf238fbcc35d7 addresses a similar issue in ReadBMPImage but does not contain the fix for WriteBMPImage. The vulnerability description, however, provides a clear explanation and a suggested patch for WriteBMPImage, which was used to identify the vulnerable function and the exact line of code. The ASan log further confirms that the crash occurs within WriteBMPImage, making the identification of this function as vulnerable a high-confidence finding.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

## Summ*ry * **-*it int***r ov*r*low in t** *MP *n*o**r’s s**nlin*-stri** *omput*tion *oll*ps*s `*yt*s_p*r_lin*` (stri**) to * tiny v*lu* w*il* t** p*r-row writ*r still *mits `* × wi*t*` *yt*s *or **-*pp im***s. T** row **s* point*r **v*n**s usin* t

Reasoning

T** vuln*r**ility *n*lysis is **s** on t** **t*il** **s*ription provi***, w*i** in*lu**s t** root **us*, * **monstr*tion o* t** vuln*r**ility, *n* *n *S*n lo*. T** vuln*r**ility is * ***p-**s** *u***r ov*r*low in t** `Writ**MPIm***` *un*tion in `*o**