CVE-2025-57803: imagemagick Heap-based Buffer Overflow
Vulnerability summary
CVE-2025-57803 is a high (CVSS 8.8) Heap-based Buffer Overflow vulnerability in imagemagick. EPSS estimates a 0.87% chance of exploitation in the next 30 days, higher than 58.2% of scored vulnerabilities. 1 public exploit is recorded.
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
6 scores · 6 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
EPSS trend
Probability
0.87%
Chance of exploitation in the next 30 days
Percentile
58%
Versus all other CVEs
30-day change
+0.03 pp
From 0.84% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundImagemagick
Maturity: poc
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- 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
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
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
5 vendors · 16 products
References
16 links- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmmX Refsource CONFIRMARTICLEREPORTWEBExploitVendor Advisory
- github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7X Refsource MISCARTICLEREPORTWEBPatch