Heap-based buffer overflow in ImageMagick - CVE-2026-25897

 

Heap-based buffer overflow in ImageMagick - CVE-2026-25897

Published: February 25, 2026


Vulnerability identifier: #VU123255
CSH Severity: High
CVSS v4: 8.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-25897
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to compromise the target system.

The vulnerability exists due to a boundary error in the sun decoder. A remote attacker can pass specially crafted data to the application, trigger a heap-based buffer overflow and perform a denial of service (DoS) attack.


Affected software

ImageMagick
Debian Linux
SUSE Linux Enterprise Server 15 SP6
SUSE Linux Enterprise Server 15 SP5
SUSE Linux Enterprise Server 15 SP4
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Desktop 15
Ubuntu
Desktop Applications Module
Development Tools Module
openSUSE Leap
imagemagick (Ubuntu package)
imagemagick (Debian package)
ImageMagick-devel-32bit
perl-PerlMagick
libMagick++-7_Q16HDRI5-32bit
ImageMagick-doc
ImageMagick-devel-64bit
libMagick++-7_Q16HDRI5-64bit-debuginfo
libMagickCore-7_Q16HDRI10-64bit
libMagick++-devel-64bit
libMagickWand-7_Q16HDRI10-64bit
libMagickWand-7_Q16HDRI10-64bit-debuginfo
libMagickCore-7_Q16HDRI10-64bit-debuginfo
libMagick++-7_Q16HDRI5-64bit
ImageMagick-devel
ImageMagick-debugsource
ImageMagick-config-7-upstream
libMagickWand-7_Q16HDRI10-32bit
libMagick++-7_Q16HDRI5
libMagick++-devel
libMagickCore-7_Q16HDRI10
libMagickCore-7_Q16HDRI10-debuginfo
ImageMagick
ImageMagick-debuginfo
libMagickWand-7_Q16HDRI10
perl-PerlMagick-debuginfo
libMagickWand-7_Q16HDRI10-debuginfo
libMagick++-7_Q16HDRI5-debuginfo
libMagick++-7_Q16HDRI5-32bit-debuginfo
libMagickWand-7_Q16HDRI10-32bit-debuginfo
libMagickCore-7_Q16HDRI10-32bit-debuginfo
libMagick++-devel-32bit
libMagickCore-7_Q16HDRI10-32bit
ImageMagick-extra
ImageMagick-extra-debuginfo
ImageMagick-config-7-SUSE
ImageMagick-config-7-upstream-open
ImageMagick-config-7-upstream-websafe
ImageMagick-config-7-upstream-limited
ImageMagick-config-7-upstream-secure

How to mitigate CVE-2026-25897

Install updates from vendor's website.

ImageMagick - addressed in versions 6.9.13-40, 7.1.2-15
imagemagick (Ubuntu package) - addressed in versions 8:6.7.7.10-6ubuntu3.13+esm19, 8:6.7.7.10-6ubuntu3.13+esm21, 8:6.8.9.9-7ubuntu5.16+esm18, 8:6.8.9.9-7ubuntu5.16+esm20, 8:6.9.7.4+dfsg-16ubuntu6.15+esm10, 8:6.9.7.4+dfsg-16ubuntu6.15+esm12, 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm8, 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm10, 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm8, 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm10, 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm7, 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm9, 8:7.1.2.3+dfsg1-1ubuntu0.1
imagemagick (Debian package) - addressed in versions 8:6.9.11.60+dfsg-1.6+deb12u7, 8:7.1.1.43+dfsg1-1+deb13u6
ImageMagick-devel-32bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
perl-PerlMagick - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagick++-7_Q16HDRI5-32bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
ImageMagick-doc - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
ImageMagick-devel-64bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagick++-7_Q16HDRI5-64bit-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickCore-7_Q16HDRI10-64bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagick++-devel-64bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickWand-7_Q16HDRI10-64bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickWand-7_Q16HDRI10-64bit-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickCore-7_Q16HDRI10-64bit-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagick++-7_Q16HDRI5-64bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
ImageMagick-devel - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-debugsource - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-config-7-upstream - update to 7.1.0.9-150400.6.68.2
libMagickWand-7_Q16HDRI10-32bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagick++-7_Q16HDRI5 - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagick++-devel - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagickCore-7_Q16HDRI10 - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagickCore-7_Q16HDRI10-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagickWand-7_Q16HDRI10 - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
perl-PerlMagick-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagickWand-7_Q16HDRI10-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagick++-7_Q16HDRI5-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
libMagick++-7_Q16HDRI5-32bit-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickWand-7_Q16HDRI10-32bit-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickCore-7_Q16HDRI10-32bit-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagick++-devel-32bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
libMagickCore-7_Q16HDRI10-32bit - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
ImageMagick-extra - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
ImageMagick-extra-debuginfo - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2
ImageMagick-config-7-SUSE - addressed in versions 7.1.0.9-150400.6.68.2, 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-config-7-upstream-open - addressed in versions 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-config-7-upstream-websafe - addressed in versions 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-config-7-upstream-limited - addressed in versions 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1
ImageMagick-config-7-upstream-secure - addressed in versions 7.1.1.21-150600.3.42.2, 7.1.1.43-150700.3.37.1

External References

Related Security Bulletins