Skip to content
OpenAdvisories
Medium · 5.9 CVE-2025-62171 EUVD-2025-34893GHSA-9pp9-cfwx-54rm

ImageMagick vulnerable to denial of service via integer overflow in BMP decoder on 32-bit systems

Published Oct 17, 2025 · Updated Nov 3, 2025 · Assigned by GitHub_M

Description

ImageMagick is an open source software suite for displaying, converting, and editing raster image files. In ImageMagick versions prior to 7.1.2-7 and 6.9.13-32, an integer overflow vulnerability exists in the BMP decoder on 32-bit systems. The vulnerability occurs in coders/bmp.c when calculating the extent value by multiplying image columns by bits per pixel. On 32-bit systems with size_t of 4 bytes, a malicious BMP file with specific dimensions can cause this multiplication to overflow and wrap to zero. The overflow check added to address CVE-2025-57803 is placed after the overflow occurs, making it ineffective. A specially crafted 58-byte BMP file with width set to 536,870,912 and 32 bits per pixel can trigger this overflow, causing the bytes_per_line calculation to become zero. This vulnerability only affects 32-bit builds of ImageMagick where default resource limits for width, height, and area have been manually increased beyond their defaults. 64-bit systems with size_t of 8 bytes are not vulnerable, and systems using default ImageMagick resource limits are not vulnerable. The vulnerability is fixed in versions 7.1.2-7 and 6.9.13-32.

Affected products

VendorProductAffectedFixed
ImageMagick ImageMagick < 6.9.13-32, >= 7.0.0-0, < 7.1.2-7 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 imagemagick 8:7.1.2.7+dfsg1-1 —
Debian 13 imagemagick 8:7.1.1.43+dfsg1-1+deb13u3 —
Debian 12 imagemagick 8:6.9.11.60+dfsg-1.6+deb12u5 —
Debian 11 imagemagick 8:6.9.11.60+dfsg-1.3+deb11u7 DLA-4339-1
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS imagemagick 8:7.1.2.8+dfsg1-1 —
Ubuntu 25.10 imagemagick No fix yet —
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS imagemagick 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm4 USN-7876-1
Ubuntu Pro 22.04 LTS imagemagick 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm5 USN-7876-1
Ubuntu Pro 20.04 LTS imagemagick 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm5 USN-7876-1
Ubuntu Pro 18.04 LTS imagemagick 8:6.9.7.4+dfsg-16ubuntu6.15+esm7 USN-7876-1
Ubuntu Pro 16.04 LTS imagemagick 8:6.8.9.9-7ubuntu5.16+esm15 USN-7876-1
Ubuntu Pro 14.04 LTS imagemagick 8:6.7.7.10-6ubuntu3.13+esm16 USN-7876-1
ReleasePackageFixed inAdvisory
RHEL 7 ELS ImageMagick +5 6.9.10.68-10.el7_9 RHSA-2026:3058
ReleasePackageFixed inAdvisory
SLES 15 SP7 ImageMagick 7.1.0.9-150400.6.46.1 SUSE-SU-2025:3867-1, SUSE-SU-2025:3796-1
SLES 15 SP6 ImageMagick 7.1.0.9-150400.6.46.1 SUSE-SU-2025:3844-1, SUSE-SU-2025:3796-1
SLES 12 SP5 ImageMagick 6.8.8.1-71.215.1 SUSE-SU-2025:3918-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 ImageMagick 7.1.2.0-160000.4.1 SUSE-SU-2025:21211-1
SLES 16.0 ImageMagick 7.1.2.0-160000.4.1 SUSE-SU-2025:21211-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed ImageMagick 7.1.2.7-1.1 openSUSE-SU-2025:15650-1
openSUSE Leap 16.0 ImageMagick 7.1.2.0-160000.4.1 openSUSE-SU-2025:20162-1
openSUSE Leap 15.6 ImageMagick 7.1.1.21-150600.3.26.1 SUSE-SU-2025:3844-1
ReleasePackageFixed inAdvisory
Alpine v3.24 imagemagick 7.1.2.8-r0 —
Alpine v3.23 imagemagick 7.1.2.8-r0 —
Alpine v3.22 imagemagick 7.1.2.8-r0 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 ImageMagick +5 6.9.10.68-7.0.5.el7_9 ELSA-2026-3058

Affected packages

EcosystemPackageAffectedFixedRecord
NuGet Magick.NET-Q16-AnyCPU < 14.9.0 14.9.0 GHSA-9pp9-cfwx-54rm
NuGet Magick.NET-Q16-HDRI-AnyCPU < 14.9.0 14.9.0 GHSA-9pp9-cfwx-54rm
NuGet Magick.NET-Q16-HDRI-x86 < 14.9.0 14.9.0 GHSA-9pp9-cfwx-54rm
NuGet Magick.NET-Q16-x86 < 14.9.0 14.9.0 GHSA-9pp9-cfwx-54rm
NuGet Magick.NET-Q8-AnyCPU < 14.9.0 14.9.0 GHSA-9pp9-cfwx-54rm
NuGet Magick.NET-Q8-x86 < 14.9.0 14.9.0 GHSA-9pp9-cfwx-54rm

Advisories 12

References