ImageMagick: Out of bounds read in multiple coders read raw pixel data
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 multiple raw image format handles. The vulnerability occurs when processing images with -extract dimensions larger than -size dimensions, causing out-of-bounds memory reads from a heap-allocated 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 over-read in ImageMagick's raw image decoders occurs when -extract dimensions exceed -size, potentially leaking sensitive memory.
Vulnerability
Overview
CVE-2026-25576 is a heap buffer over-read vulnerability in ImageMagick, affecting multiple raw image format decoders (e.g., CMYK, YUV, MAP). The root cause is that when processing images with the -extract option specifying dimensions larger than the -size option, the decoder iterates over image->columns (the extract width) instead of the actual allocated buffer width. This leads to out-of-bounds reads from a heap-allocated buffer [1][3].
Exploitation
An attacker can trigger the vulnerability by providing a crafted image file and using ImageMagick command-line options such as -extract 1000x1000 -size 10x10 input.png output.png. No authentication is required; the attack surface is any application or service that processes user-supplied images with ImageMagick. The bug exists in the ReadCMYKImage function` loops for raw formats, where the loop bound was not clamped to the minimum of the extract and size dimensions [3].
Impact
Successful exploitation results in reading heap memory beyond the allocated buffer. This can leak sensitive information (e.g., cryptographic keys, passwords, or other data) present in adjacent heap regions. The CVSS score is not yet assigned, but the vulnerability is classified as a heap buffer over-read with potential information disclosure [1].
Mitigation
Mitigation
The issue is patched in ImageMagick versions 7.1.2-15 and 6.9.13-40. Users should update immediately. No workarounds are documented; however, disabling raw format support or restricting -extract usage via policy may reduce risk. The fix introduces a columns variable that caps the loop iteration to MagickMin(image->columns, canvas_image->columns) [3]. The vulnerability is also tracked in downstream projects such as Magick.NET [4].
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-Q8-AnyCPUNuGet | < 14.10.3 | 14.10.3 |
Magick.NET-Q8-OpenMP-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 or <6.9.13-40+ 1 more
- (no CPE)range: <7.1.2-15 or <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-jv4p-gjwq-9r2jghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25576ghsaADVISORY
- github.com/ImageMagick/ImageMagick/commit/077b42643212d7da8c1a4f6b2cd0067ebca8ec0fghsax_refsource_MISCWEB
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-jv4p-gjwq-9r2jghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.10.3ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.