ImageMagick has heap buffer over-read in MAP image decoder
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, a heap buffer over-read vulnerability exists in the MAP image decoder when processing crafted MAP files, potentially leading to crashes or unintended memory disclosure during image decoding. Versions 7.1.2-15 and 6.9.13-40 contain a patch.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap buffer over-read in ImageMagick's MAP decoder allows crafted files to cause crashes or memory disclosure.
Vulnerability
Analysis
A heap buffer over-read vulnerability exists in the MAP image decoder within ImageMagick, a widely used open-source image processing suite [1]. The issue, present in versions prior to 7.1.2-15 and 6.9.13-40, occurs when the decoder processes specially crafted MAP files. The root cause is an insufficient validation of the colormap index calculation; when the image depth is 8 bits or less and the number of colors exceeds 256, the index shift operation can read beyond the allocated heap buffer [2][4].,4].
Attack
Vector
Exploitation requires an attacker to open a malformed MAP file via ImageMagick's command-line tools or an application using the library. No special privileges are needed, as the attack surface is local, either by a user opening a file or through automated processing of user-supplied images. The crafted file can trigger the over-read during the decoding phase, potentially leaking adjacent heap memory or causing a crash [2].
Impact
An attacker could crash the application (denial of service) or, more concerning, read unintended heap memory contents, which may include sensitive data from other processes or memory regions. The vulnerability is classified as a heap buffer over-read and is listed in the advisory as GHSA-42p5-62qq-mmh7 [3].
Mitigation
The vulnerability is patched in ImageMagick versions 7.1.2-15 and 6.9.13-40 [2]. Users should update immediately. The fix adds a boundary check to reject images with a depth ≤ 8 bits and colors > 256 [4]. No public evidence of active exploitation has been reported as of the publication date.
- GitHub - ImageMagick/ImageMagick: ImageMagick is a free, open-source software suite for creating, editing, converting, and displaying images. It supports 200+ formats and offers powerful command-line tools and APIs for automation, scripting, and integration across platforms.
- NVD - CVE-2026-25987
- Release Magick.NET 14.10.3 · dlemstra/Magick.NET
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-4… · ImageMagick/ImageMagick@bbae021
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
Magick.NET-Q16-AnyCPUNuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-HDRI-AnyCPUNuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-HDRI-OpenMP-arm64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-HDRI-OpenMP-x64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-HDRI-arm64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-HDRI-x64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-HDRI-x86NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-OpenMP-arm64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-OpenMP-x64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-OpenMP-x86NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-arm64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-x64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q16-x86NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-AnyCPUNuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-OpenMP-arm64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-OpenMP-x64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-arm64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-x64NuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-x86NuGet | < 14.10.3 | 14.10.3 |
Affected products
2<7.1.2-15, <6.9.13-40+ 1 more
- (no CPE)range: <7.1.2-15, <6.9.13-40
- (no CPE)range: >= 7.0.0, < 7.1.2-15
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-42p5-62qq-mmh7ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25987ghsaADVISORY
- github.com/ImageMagick/ImageMagick/commit/bbae0215e1b76830509fd20e6d37c0dd7e3e4c3aghsaWEB
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-42p5-62qq-mmh7ghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.10.3ghsaWEB
News mentions
0No linked articles in our index yet.