ImageMagick has XMP profile write that triggers hang due to unbounded loop
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. In versions prior to 7.1.2-0, infinite lines occur when writing during a specific XMP file conversion command. Version 7.1.2-0 fixes the issue.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
ImageMagick versions before 7.1.2-0 have an unbounded loop vulnerability when writing XMP profiles during image conversion, causing a hang or denial of service.
Vulnerability
Description
In ImageMagick versions prior to 7.1.2-0, a vulnerability exists in the SyncXmpProfile function within profile.c. The bug is caused by a missing return statement in GetXmpNumeratorAndDenominator. When processing XMP metadata with a specific numerator/denominator value (e.g., 720000000000000), the function enters an infinite loop, never returning [3][4]. This infinite loop occurs during the writing phase of an XMP file conversion command [2].
Exploitation
The vulnerability can be triggered by providing a specially crafted XMP profile as part of an image file. The attack requires no authentication beyond the ability to pass an image file to ImageMagick for conversion or writing. An attacker could exploit this by submitting a malicious image to a service that uses ImageMagick to process user-uploaded images, such as a web application or a scripted pipeline [1][4]. The issue is in the write path, so any command that writes an image with a crafted XMP profile (e.g., convert input.png -write output.png) would trigger the hang [4].
Impact
When exploited, the infinite loop causes ImageMagick to hang indefinitely, consuming CPU resources and never completing the operation. This can lead to a denial of service (DoS) condition, making the application or service unresponsive. The vulnerability does not provide code execution or data theft but can render image processing services unavailable [2][4].
Mitigation
The issue is fixed in ImageMagick version 7.1.2-0 [2][3]. Users are advised to upgrade to this version or later. For users who cannot upgrade, workarounds include restricting or validating user-supplied image metadata, or implementing timeouts for ImageMagick processes. The vulnerability was reported as a security advisory with GitHub (GHSA-vmhh-8rxq-fp9g) [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-2025-53015
- Added missing return. · ImageMagick/ImageMagick@3863160
- XMP profile write triggers hang due to unbounded loop
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-Q8-AnyCPUNuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-AnyCPUNuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-HDRI-AnyCPUNuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q8-x64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q8-arm64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q8-x86NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q8-OpenMP-x64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q8-OpenMP-arm64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-x64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-arm64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-x86NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-OpenMP-x64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-OpenMP-arm64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-OpenMP-x86NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-HDRI-x64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-HDRI-arm64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-HDRI-x86NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-HDRI-OpenMP-x64NuGet | < 14.7.0 | 14.7.0 |
Magick.NET-Q16-HDRI-OpenMP-arm64NuGet | < 14.7.0 | 14.7.0 |
Affected products
2<7.1.2-0+ 1 more
- (no CPE)range: <7.1.2-0
- (no CPE)range: < 7.1.2-0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-vmhh-8rxq-fp9gghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-53015ghsaADVISORY
- drive.google.com/file/d/1iegkwlTjqnJTtM4XkiheYsjKsC6pxtId/viewghsax_refsource_MISCWEB
- github.com/ImageMagick/ImageMagick/commit/229fa96a988a21d78318bbca61245a6ed1ee33a0ghsaWEB
- github.com/ImageMagick/ImageMagick/commit/38631605e6ab744548a561797472cf8648bcfe26ghsaWEB
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-vmhh-8rxq-fp9gghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.7.0ghsaWEB
News mentions
0No linked articles in our index yet.