Memory allocation with excessive without limits in the internal SVG 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 crafted SVG file containing an malicious element causes ImageMagick to attempt to allocate ~674 GB of memory, leading to an out-of-memory abort. 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 crafted SVG file can cause ImageMagick to attempt allocating ~674 GB of memory, leading to an out-of-memory abort.
Vulnerability
Overview
CVE-2026-25985 is a denial-of-service vulnerability in ImageMagick, a widely used open-source image processing suite. The issue exists in versions prior to 7.1.2-15 and 6.9.13-40. A specially crafted SVG file containing a malicious element triggers an attempt to allocate approximately 674 GB of memory, causing an out-of-memory abort and effectively crashing the application [2]. The root cause is insufficient bounds checking in the internal SVG decoder, where memory allocation requests are not properly validated against configurable limits [4].
Exploitation
An attacker can exploit this vulnerability by providing a malicious SVG file to an application or service that uses ImageMagick to process user-supplied images. No authentication is required; the attack can be delivered via any vector that allows file upload or image processing, such as web applications, email attachments, or file conversion services. The crafted SVG element causes the decoder to compute an excessive memory allocation size, bypassing the previous check that used MAGICK_SSIZE_MAX instead of the configurable GetMaxMemoryRequest() limit [4].
Impact
Successful exploitation results in a denial of service (DoS) due to memory exhaustion. The application or system may become unresponsive or crash, potentially affecting availability for legitimate users. There is no indication of code execution or data leakage; the impact is limited to availability [2].
Mitigation
The vulnerability is patched in ImageMagick versions 7.1.2-15 and 6.9.13-40 [2]. Users should update to these versions or later. As a general security practice, administrators can also configure ImageMagick's policy file to limit memory usage and disable SVG processing if not required [1]. The fix replaces the hardcoded MAGICK_SSIZE_MAX comparison with a call to GetMaxMemoryRequest(), which respects the user-defined memory limits [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-25985
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-v… · ImageMagick/ImageMagick@1a51eb9
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-v7g2-m8c5-mf84ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25985ghsaADVISORY
- github.com/ImageMagick/ImageMagick/commit/1a51eb9af00c36724660e294520878fd1f13e312ghsaWEB
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-v7g2-m8c5-mf84ghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.10.3ghsaWEB
News mentions
0No linked articles in our index yet.