CVE-2025-57807: imagemagick Heap-based Buffer Overflow
Vulnerability summary
CVE-2025-57807 is a critical (CVSS 9.8) Heap-based Buffer Overflow vulnerability in imagemagick. EPSS estimates a 0.29% chance of exploitation in the next 30 days, higher than 20.4% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 5 · Related 3Timeline
- 05-09-2025PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. ImageMagick versions lower than 14.8.2 include insecure functions: SeekBlob(), which permits advancing the stream offset beyond the current end without increasing capacity, and WriteBlob(), which then expands by quantum + length (amortized) instead of offset + length, and copies to data + offset. When offset ≫ extent, the copy targets memory beyond the allocation, producing a deterministic heap write on 64-bit builds. No 2⁶⁴ arithmetic wrap, external delegates, or policy settings are required. This is fixed in version 14.8.2.
CVSS metrics
5 scores · 5 sources · 1 version- CVE.orgCNA3.8LowCVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LDiffers
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · NugetEcosystem advisory · calculated3.8LowCVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:LDiffers
EPSS trend
Probability
0.29%
Chance of exploitation in the next 30 days
Percentile
20%
Versus all other CVEs
30-day change
0.00 pp
From 0.29% 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-131Incorrect Calculation of Buffer SizeThe product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
NuGet12 products
- Magick.NET-Q16-arm64< 14.8.2
- Magick.NET-Q16-HDRI-arm64< 14.8.2
- Magick.NET-Q16-HDRI-OpenMP-arm64< 14.8.2
- Magick.NET-Q16-HDRI-OpenMP-x64< 14.8.2
- Magick.NET-Q16-HDRI-x64< 14.8.2
Suse4 products
- ImageMagick&distro=SUSE Linux Enterprise Module for Desktop Applications 15 SP6< 7.1.0.9-150400.6.43.1 | < 7.1.1.21-150600.3.23.1
- ImageMagick&distro=SUSE Linux Enterprise Module for Desktop Applications 15 SP7< 7.1.1.43-150700.3.16.1 | < 7.1.0.9-150400.6.43.1
- ImageMagick&distro=SUSE Linux Enterprise Module for Development Tools 15 SP6< 7.1.1.21-150600.3.23.1
- ImageMagick&distro=SUSE Linux Enterprise Module for Development Tools 15 SP7< 7.1.1.43-150700.3.16.1
Opensuse2 products
- ImageMagick&distro=openSUSE Leap 15.6< 7.1.1.21-150600.3.23.1
- ImageMagick&distro=openSUSE Tumbleweed< 7.1.2.3-1.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< 14.8.2 | < 6.9.13-29 | ≥ 7.0.0-0, < 7.1.2-3
Ubuntu1 product
- imagemagick< 8:6.7.7.10-6ubuntu3.13+esm14 | < 8:6.8.9.9-7ubuntu5.16+esm13 | < 8:6.9.7.4+dfsg-16ubuntu6.15+esm5 | < 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm3 | < 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm3 | < 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm2
6 vendors · 21 products
References
15 links- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-23hg-53q6-hqfgX Refsource CONFIRMREPORTWEBExploitMitigationVendor Advisory
- github.com/ImageMagick/ImageMagick/commit/077a417a19a5ea8c85559b602754a5b928eef23eX Refsource MISCREPORTWEBPatch