CVE-2025-62171
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-17

Last updated on: 2025-11-03

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-17
Last Modified
2025-11-03
Generated
2026-05-07
AI Q&A
2025-10-17
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
imagemagick imagemagick From 7.0.11-13 (inc) to 7.1.1-36 (inc)
imagemagick imagemagick From 7.0.11-13 (inc) to 7.1.1-36 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-190 The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is an integer overflow in the BMP image decoder of ImageMagick on 32-bit systems. It happens when the software calculates the size of image data by multiplying the number of columns by bits per pixel. On 32-bit systems, this multiplication can overflow and wrap to zero if a specially crafted BMP file with very large dimensions is processed. This causes incorrect calculations that can lead to a security issue. The problem affects only 32-bit builds with manually increased resource limits and is fixed in versions 7.1.2-7 and 6.9.13-32.


How can this vulnerability impact me? :

The vulnerability can cause the bytes_per_line calculation to become zero due to integer overflow, which may lead to denial of service or other unexpected behavior when processing malicious BMP files. Since the CVSS score indicates a high impact on availability (A:H) but no impact on confidentiality or integrity, the main risk is disruption of service or application crashes on vulnerable 32-bit ImageMagick installations with increased resource limits.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, immediately upgrade ImageMagick to version 7.1.2-7 or 6.9.13-32 or later. Additionally, ensure that default resource limits for width, height, and area are not manually increased beyond their defaults on 32-bit systems. If you are running a 64-bit system, you are not vulnerable.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart