VYPR
Moderate severityNVD Advisory· Published Feb 24, 2026· Updated Feb 26, 2026

ImageMagick has heap overflow in sun decoder on 32-bit systems that can result in out of bounds write

CVE-2026-25897

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, an Integer Overflow vulnerability exists in the sun decoder. On 32-bit systems/builds, a carefully crafted image can lead to an out of bounds heap write. 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.

Integer overflow in ImageMagick's sun decoder allows heap out-of-bounds write on 32-bit systems, patched in versions 7.1.2-15 and 6.9.13-40.

Vulnerability

Overview

CVE-2026-25897 is an integer overflow vulnerability in ImageMagick's sun decoder, affecting both the legacy 6.x and modern 7.x series prior to versions 6.9.13-40 and 7.1.2-15 respectively [2]. The flaw manifests specifically on 32-bit systems or builds where integer arithmetic can overflow during image dimension calculations. A crafted SUN raster image can trigger an out-of-bounds heap write, potentially leading to memory corruption [2][4].

Exploitation

Vector

The vulnerability resides in the ReadSUNImage function, where the product of pixels_length and image->rows is computed without proper overflow checks [4]. An attacker must provide a specially crafted SUN image file that exploits the 32-bit integer wrapping. No authentication is required if the victim processes the malicious image using an affected ImageMagick version, making it exploitable via user uploads or automated image processing pipelines [1].

Impact

Successful exploitation results in a heap overflow, which can cause a denial-of-service (crash) or, under favorable memory conditions, arbitrary code execution in the context of the ImageMagick process [2]. This is particularly concerning for environments that rely on ImageMagick for server-side image processing, such as content management systems or media conversion services, where a crafted image could compromise the host system.

Mitigation

The ImageMagick project has released patched versions: 6.9.13-40 and 7.1.2-15, which add an explicit integer overflow check before memory allocation [4]. Users should upgrade immediately. The related advisory (GHSA-6j5f-24fw-pqp4) is also noted in the Magick.NET release notes, indicating downstream projects have been updated [3]. No workaround is available apart from disabling SUN format support or using a policy file to block the format until the patch can be applied [1].

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.10.314.10.3
Magick.NET-Q16-HDRI-AnyCPUNuGet
< 14.10.314.10.3
Magick.NET-Q16-HDRI-OpenMP-arm64NuGet
< 14.10.314.10.3
Magick.NET-Q16-HDRI-OpenMP-x64NuGet
< 14.10.314.10.3
Magick.NET-Q16-HDRI-arm64NuGet
< 14.10.314.10.3
Magick.NET-Q16-HDRI-x64NuGet
< 14.10.314.10.3
Magick.NET-Q16-HDRI-x86NuGet
< 14.10.314.10.3
Magick.NET-Q16-OpenMP-arm64NuGet
< 14.10.314.10.3
Magick.NET-Q16-OpenMP-x64NuGet
< 14.10.314.10.3
Magick.NET-Q16-OpenMP-x86NuGet
< 14.10.314.10.3
Magick.NET-Q16-arm64NuGet
< 14.10.314.10.3
Magick.NET-Q16-x64NuGet
< 14.10.314.10.3
Magick.NET-Q16-x86NuGet
< 14.10.314.10.3
Magick.NET-Q8-AnyCPUNuGet
< 14.10.314.10.3
Magick.NET-Q8-OpenMP-arm64NuGet
< 14.10.314.10.3
Magick.NET-Q8-OpenMP-x64NuGet
< 14.10.314.10.3
Magick.NET-Q8-arm64NuGet
< 14.10.314.10.3
Magick.NET-Q8-x64NuGet
< 14.10.314.10.3
Magick.NET-Q8-x86NuGet
< 14.10.314.10.3

Affected products

2
  • ImageMagick/Imagemagickllm-fuzzy2 versions
    before 7.1.2-15 and before 6.9.13-40+ 1 more
    • (no CPE)range: before 7.1.2-15 and before 6.9.13-40
    • (no CPE)range: >= 7.0.0, < 7.1.2-15

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.