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

Medium 5.9 Published Updated

Attackers can cause denial of service in ImageMagick on 32-bit systems via integer overflow in BMP decoder if resource limits are increased.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-62171?

CVE-2025-62171 is a medium-severity vulnerability in Imagemagick Imagemagick, published on 17 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-190

Which versions are affected by CVE-2025-62171?

12 open source packages ship an affected version, including Magick.NET-Q16-AnyCPU, Magick.NET-Q16-HDRI-AnyCPU and Magick.NET-Q16-HDRI-x86. It affects 1 product.

PackageAffectedFixed in
Magick.NET-Q16-AnyCPU NuGetAll versions14.9.0
Magick.NET-Q16-AnyCPU NuGetAll versions14.9.0
Magick.NET-Q16-HDRI-AnyCPU NuGetAll versions14.9.0
Magick.NET-Q16-HDRI-AnyCPU NuGetAll versions14.9.0
Magick.NET-Q16-HDRI-x86 NuGetAll versions14.9.0
Magick.NET-Q16-HDRI-x86 NuGetAll versions14.9.0
6 more packages
Magick.NET-Q16-x86 NuGetAll versions14.9.0
Magick.NET-Q16-x86 NuGetAll versions14.9.0
Magick.NET-Q8-AnyCPU NuGetAll versions14.9.0
Magick.NET-Q8-AnyCPU NuGetAll versions14.9.0
Magick.NET-Q8-x86 NuGetAll versions14.9.0
Magick.NET-Q8-x86 NuGetAll versions14.9.0
Linux distribution packages (9)
ImageMagick SUSE:Linux Enterprise Module for Desktop Applications 15 SP6All versions7.1.0.9-150400.6.46.1
ImageMagick SUSE:Linux Enterprise Module for Desktop Applications 15 SP6All versions7.1.1.21-150600.3.26.1
ImageMagick SUSE:Linux Enterprise Module for Desktop Applications 15 SP7All versions7.1.0.9-150400.6.46.1
ImageMagick SUSE:Linux Enterprise Module for Desktop Applications 15 SP7All versions7.1.1.43-150700.3.19.1
ImageMagick SUSE:Linux Enterprise Module for Development Tools 15 SP6All versions7.1.1.21-150600.3.26.1
ImageMagick SUSE:Linux Enterprise Module for Development Tools 15 SP7All versions7.1.1.43-150700.3.19.1
ImageMagick SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions6.8.8.1-71.215.1
ImageMagick openSUSE:Leap 15.6All versions7.1.1.21-150600.3.26.1
ImageMagick openSUSE:TumbleweedAll versions7.1.2.7-1.1

Products include Imagemagick Imagemagick.

How do I fix CVE-2025-62171?

Upgrade Magick.NET-Q16-AnyCPU to 14.9.0 or later.

Is CVE-2025-62171 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62171 exists.

All Imagemagick Imagemagick vulnerabilities

Sources

Also known as CLSA-2025-1764280893, CLSA-2025-1764324335, CLSA-2025-1764324579, CLSA-2025-1764773600, DEBIAN-CVE-2025-62171, DLA-4339-1 and 15 more.

Is CVE-2025-62171 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free