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

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

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Oct 2025
- **Updated:** 3 Nov 2025
- **Also known as:** CLSA-2025-1764280893, CLSA-2025-1764324335, CLSA-2025-1764324579, CLSA-2025-1764773600, DEBIAN-CVE-2025-62171, DLA-4339-1, GHSA-9pp9-cfwx-54rm, JLSEC-2026-927, MINI-3jg5-963p-c8xh, OESA-2025-2497, OESA-2025-2498, OESA-2025-2499, OESA-2025-2500, OESA-2025-2501, SUSE-SU-2025:3796-1, SUSE-SU-2025:3844-1, SUSE-SU-2025:3867-1, SUSE-SU-2025:3918-1, UBUNTU-CVE-2025-62171, USN-7876-1, openSUSE-SU-2025:15650-1

## 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 (Integer Overflow or Wraparound)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Magick.NET-Q16-AnyCPU` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-AnyCPU` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-HDRI-AnyCPU` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-HDRI-AnyCPU` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-HDRI-x86` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-HDRI-x86` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-x86` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q16-x86` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q8-AnyCPU` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q8-AnyCPU` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q8-x86` | NuGet | All versions | 14.9.0 |
| `Magick.NET-Q8-x86` | NuGet | All versions | 14.9.0 |
| `ImageMagick` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP6 | All versions | 7.1.0.9-150400.6.46.1 |
| `ImageMagick` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP6 | All versions | 7.1.1.21-150600.3.26.1 |
| `ImageMagick` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP7 | All versions | 7.1.0.9-150400.6.46.1 |
| `ImageMagick` | SUSE:Linux Enterprise Module for Desktop Applications 15 SP7 | All versions | 7.1.1.43-150700.3.19.1 |
| `ImageMagick` | SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 7.1.1.21-150600.3.26.1 |
| `ImageMagick` | SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 7.1.1.43-150700.3.19.1 |
| `ImageMagick` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 6.8.8.1-71.215.1 |
| `ImageMagick` | openSUSE:Leap 15.6 | All versions | 7.1.1.21-150600.3.26.1 |
| `ImageMagick` | openSUSE:Tumbleweed | All versions | 7.1.2.7-1.1 |

Products: 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.

## Other vulnerabilities in Imagemagick Imagemagick

- [CVE-2019-19952](https://insights.sbomify.com/CVE-2019-19952/): Use after free in n/a (critical 9.8)
- [CVE-2018-16328](https://insights.sbomify.com/CVE-2018-16328/): Null dereference in n/a (critical 9.8)
- [CVE-2018-16329](https://insights.sbomify.com/CVE-2018-16329/): Null dereference in n/a (critical 9.8)
- [CVE-2017-18210](https://insights.sbomify.com/CVE-2017-18210/): Null dereference in n/a (critical 9.8)
- [CVE-2017-14138](https://insights.sbomify.com/CVE-2017-14138/): Denial of service in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-62171 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62171 exists.

Affected packages and fixed versions:
- Magick.NET-Q16-AnyCPU (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-AnyCPU (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-HDRI-AnyCPU (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-HDRI-AnyCPU (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-HDRI-x86 (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-HDRI-x86 (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-x86 (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q16-x86 (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q8-AnyCPU (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q8-AnyCPU (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q8-x86 (NuGet): affected all versions; fixed in 14.9.0
- Magick.NET-Q8-x86 (NuGet): affected all versions; fixed in 14.9.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-62171/ (Markdown: https://insights.sbomify.com/CVE-2025-62171/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-62171
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-62171
- OSV: https://osv.dev/vulnerability/CVE-2025-62171

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-62171/
Summaries are generated and may contain mistakes; the official description above is the record.
