ImageMagick: integer overflows in MNG magnification
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-27 and 7.1.2-1, the magnified size calculations in ReadOneMNGIMage (in coders/png.c) are unsafe and can overflow, leading to memory corruption. This issue has been patched in versions 6.9.13-27 and 7.1.2-1.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
ImageMagick MNG image parsing contains an integer overflow in magnified size calculations, leading to memory corruption.
Vulnerability
Overview
ImageMagick is a widely used open-source software suite for image editing and manipulation. Prior to versions 6.9.13-27 and 7.1.2-1, the ReadOneMNGImage function in coders/png.c contains an unsafe integer overflow vulnerability. The magnified size calculations, specifically for magnified_height and magnified_width, are computed without proper overflow checks, potentially resulting in memory corruption [1][3]. The root cause lies in how magnification factors from the MNG MAGN chunk are applied during image scaling [1].
Exploitation
Details
The vulnerability is triggered during the processing of the MNG file format, specifically when handling the MAGN (magnification) command. The attacker can craft a malicious MNG file that provides specially crafted magnification values (magn_mb, magn_ml, magn_mr, magn_mt, magn_mx, magn_my). When these values are used in size calculations, an integer overflow can occur, leading to an undersized buffer allocation that is subsequently overwritten [1]. The attack requires no special privileges beyond supplying the malicious file to an application using ImageMagick (e.g., via web upload, email attachment, or automated processing pipeline) [2].
Impact
Successful exploitation results in memory corruption, which could allow an attacker to cause a denial of service (application crash) or potentially execute arbitrary code, depending on the specific exploit and environment. Since ImageMagick is commonly used in server-side image processing and content management systems, the impact is significant [2][3].
Mitigation
The issue has been patched in ImageMagick versions 6.9.13-27 and 7.1.2-1. Users are strongly advised to update to these or later versions. For environments that cannot immediately upgrade, implementing a security policy that disables MNG processing (e.g., via policy.xml) may serve as a temporary workaround [1][2]. A related fix is also included in Magick.NET 14.8.0 [4].
- [BIGSLEEP-435153105] imagemagick: integer overflows in MNG magnification
- 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-55154
- Release Magick.NET 14.8.0 · dlemstra/Magick.NET
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-x86NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q8-x64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q8-arm64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q8-OpenMP-x64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q8-OpenMP-arm64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q8-AnyCPUNuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-x86NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-x64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-arm64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-OpenMP-x64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-OpenMP-arm64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-HDRI-x86NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-HDRI-x64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-HDRI-arm64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-HDRI-OpenMP-x64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-HDRI-OpenMP-arm64NuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-HDRI-AnyCPUNuGet | < 14.8.0 | 14.8.0 |
Magick.NET-Q16-AnyCPUNuGet | < 14.8.0 | 14.8.0 |
Affected products
2<6.9.13-27, <7.1.2-1+ 1 more
- (no CPE)range: <6.9.13-27, <7.1.2-1
- (no CPE)range: < 6.9.13-27
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-qp29-wxp5-wh82ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-55154ghsaADVISORY
- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qp29-wxp5-wh82ghsax_refsource_CONFIRMWEB
- github.com/dlemstra/Magick.NET/releases/tag/14.8.0ghsaWEB
- goo.gle/bigsleepmitrex_refsource_MISC
- issuetracker.google.com/savedsearches/7155917ghsaWEB
- lists.debian.org/debian-lts-announce/2025/09/msg00012.htmlghsaWEB
News mentions
0No linked articles in our index yet.