VYPR
High severityNVD Advisory· Published Aug 13, 2025· Updated Aug 13, 2025

ImageMagick: heap-buffer overflow read in MNG magnification with alpha

CVE-2025-55004

Description

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to version 7.1.2-1, ImageMagick is vulnerable to heap-buffer overflow read around the handling of images with separate alpha channels when performing image magnification in ReadOneMNGIMage. This can likely be used to leak subsequent memory contents into the output image. This issue has been patched in version 7.1.2-1.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

ImageMagick before 7.1.2-1 has a heap-buffer overflow read in ReadOneMNGImage when magnifying images with separate alpha channels, potentially leaking memory.

Vulnerability

Overview

CVE-2025-55004 is a heap-buffer overflow read vulnerability in ImageMagick, affecting versions prior to 7.1.2-1. The bug resides in the ReadOneMNGImage function within coders/png.c and is triggered during image magnification (MAGN chunk) when handling images that have a separate alpha channel (color type >= 12) [1]. The root cause is a mismatch between the allocated buffer size for intermediate pixel rows and the actual number of channels after the alpha channel is dynamically added to the image's channel map [1].

Exploitation

Details

An attacker can exploit this by crafting a malicious MNG file that includes a JPEG image with a separate alpha channel and a MAGN chunk. When ImageMagick processes this file, the alpha channel is loaded but the GetAuthenticPixels call that updates the channel map may not occur until after the intermediate buffers next and prev are allocated based on the old channel count [1]. Subsequent pixel reads using GetPixelXXX macros assume the larger channel layout, causing reads beyond the allocated buffer boundaries [1]. The provided proof-of-concept generates such an MNG file and is not blocked by default security policies [1].

Impact

This heap-buffer overflow read can likely be used to leak subsequent memory contents into the output image, potentially exposing sensitive information from the process's address space [1][3]. The vulnerability does not require authentication and can be triggered remotely by processing a crafted file.

Mitigation

The issue has been patched in ImageMagick version 7.1.2-1 [1][3]. Users should update to this version or later. For environments using ImageMagick for image processing should apply the update promptly. The Magick.NET wrapper also addressed this in version 14.8.0 [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.

PackageAffected versionsPatched versions
Magick.NET-Q16-AnyCPUNuGet
< 14.8.014.8.0
Magick.NET-Q16-HDRI-AnyCPUNuGet
< 14.8.014.8.0
Magick.NET-Q16-HDRI-OpenMP-arm64NuGet
< 14.8.014.8.0
Magick.NET-Q16-HDRI-OpenMP-x64NuGet
< 14.8.014.8.0
Magick.NET-Q16-HDRI-arm64NuGet
< 14.8.014.8.0
Magick.NET-Q16-HDRI-x64NuGet
< 14.8.014.8.0
Magick.NET-Q16-HDRI-x86NuGet
< 14.8.014.8.0
Magick.NET-Q16-OpenMP-arm64NuGet
< 14.8.014.8.0
Magick.NET-Q16-OpenMP-x64NuGet
< 14.8.014.8.0
Magick.NET-Q16-arm64NuGet
< 14.8.014.8.0
Magick.NET-Q16-x64NuGet
< 14.8.014.8.0
Magick.NET-Q16-x86NuGet
< 14.8.014.8.0
Magick.NET-Q8-AnyCPUNuGet
< 14.8.014.8.0
Magick.NET-Q8-OpenMP-arm64NuGet
< 14.8.014.8.0
Magick.NET-Q8-OpenMP-x64NuGet
< 14.8.014.8.0
Magick.NET-Q8-arm64NuGet
< 14.8.014.8.0
Magick.NET-Q8-x64NuGet
< 14.8.014.8.0
Magick.NET-Q8-x86NuGet
< 14.8.014.8.0

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.