ImageMagick has a heap buffer overflow in YUV 4:2:2 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 overflow write vulnerability exists in ReadYUVImage() (coders/yuv.c) when processing malicious YUV 4:2:2 (NoInterlace) images. The pixel-pair loop writes one pixel beyond the allocated row buffer. 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 overflow write in ImageMagick's ReadYUVImage() when processing malicious YUV 4:2:2 images can crash or lead to code execution; fixed in versions 7.1.2-15 and 6.9.13-40.
A heap buffer overflow write vulnerability exists in the ReadYUVImage() function within coders/yuv.c of ImageMagick [1][2][4]. The issue arises when processing specially crafted YUV 4:2:2 images with the NoInterlace variant. During pixel-pair decode loops, the routine writes one pixel beyond the allocated row buffer, leading to an out-of-bounds memory write [4]. The flaw is classified as a heap buffer overflow, and sanitizer output confirms the write occurs on the heap [4].
The attack surface is exposed through any vector that causes ImageMagick to decode a malicious YUV file. This includes user-uploaded images processed by web applications, automated image pipelines, or direct command-line invocation (convert, identify, etc.) [1][2]. The vulnerability requires no special privileges; an attacker only needs to supply a crafted YUV image. Since ImageMagick auto-detects and decodes many formats, opening a manipulated file is sufficient to trigger the overflow [1][4].
Impact: successful exploitation of the heap overflow can result in application crashes or, as with many heap overflows, potentially arbitrary code execution in the context of the process [2][4]. The CVSS score is pending, but the advisory notes a heap-buffer-overflow of 8 bytes, which could corrupt adjacent heap metadata or data [4].
The vulnerability affects all ImageMagick distributions prior to versions 7.1.2-15 and 6.9.13-40 [2][4]. These versions contain the proper bounds check and fix the overflow. Users should update immediately. The fix is also included in downstream wrappers such as Magick.NET release 14.10.3 [3]. No workaround is documented for unpatched versions; a security policy can restrict YUV handling to reduce risk [1][4].
- 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-25986
- Release Magick.NET 14.10.3 · dlemstra/Magick.NET
- Heap buffer overflow in YUV 4:2:2 decoder
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-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-Q16-HDRI-OpenMP-x64NuGet | < 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
4- github.com/advisories/GHSA-mqfc-82jx-3mr2ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25986ghsaADVISORY
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mqfc-82jx-3mr2ghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.10.3ghsaWEB
News mentions
0No linked articles in our index yet.