CVE-2025-57803: ImageMagick (WriteBMPImage): 32-bit integer overflow when writing BMP scanline stride → heap buffer overflow
Vulnerability summary
CVE-2025-57803 is a high (CVSS 8.8) Heap-based Buffer Overflow vulnerability in imagemagick. EPSS estimates a 1.00% chance of exploitation in the next 30 days, higher than 64% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (GitHub, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 11 · Related 9Timeline
- 26-08-2025PublishedVulnerability first disclosed.
- 26-02-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 7 sources · 1 version- CVE.orgCNA7.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · Red hatEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · NugetEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · AlpineEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.00%
Chance of exploitation in the next 30 days
Percentile
64%
Versus all other CVEs
30-day change
Increase +0.09 pp
From 0.91% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundImagemagick
Maturity: poc
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowThe product writes past the end of a buffer that was allocated on the heap.
- CWE-190Integer Overflow or WraparoundThe product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Affected systems
Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat7 products
- ImageMagick< 0:6.9.10.68-9.el7_9
- ImageMagick-c++< 0:6.9.10.68-9.el7_9
- ImageMagick-c++-devel< 0:6.9.10.68-9.el7_9
- ImageMagick-debuginfo< 0:6.9.10.68-9.el7_9
- ImageMagick-devel< 0:6.9.10.68-9.el7_9
NuGet6 products
- Magick.NET-Q16-AnyCPU< 14.8.1
- Magick.NET-Q16-HDRI-AnyCPU< 14.8.1
- Magick.NET-Q16-HDRI-x86< 14.8.1
- Magick.NET-Q16-x86< 14.8.1
- Magick.NET-Q8-AnyCPU< 14.8.1
Alpine1 product
- imagemagick≥ 7.0.0-0, < 7.1.2.8-r0 | < 7.1.2.8-r0
Debian1 product
- imagemagick< 8:6.9.11.60+dfsg-1.6+deb12u4 | < 8:7.1.1.43+dfsg1-1+deb13u2 | < 8:7.1.2.3+dfsg1-1
Imagemagick1 product
- imagemagick< 7.1.2-2 | < 6.9.13-28 | ≥ 7.0.0-0, < 7.1.2-2
Ubuntu1 product
- imagemagick< 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
6 vendors · 17 products
References
17 links- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmmX Refsource CONFIRMARTICLEREPORTWEBExploitVendor Advisory
- github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7X Refsource MISCARTICLEREPORTWEBPatch