ImageMagick
CVE-2025-62171
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted 58-byte BMP to service
-
DeliveryInteger overflow in ReadBMPImage (extent calc)
-
Exploitsize_t truncates to zero on 32-bit
-
ExecutionBMPOverflowCheck bypassed
-
PersistCorrupted allocation/sizing
-
ImpactDecoder crash and denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires ALL of: (1) a 32-bit platform (i386, i686, armv7l, etc.) where size_t is 4 bytes - 64-bit systems are explicitly not vulnerable because the multiplication does not truncate; (2) ImageMagick's default width/height/area resource limits manually increased (stock default limits block the oversized dimensions); and (3) attacker ability to get a crafted BMP (e.g. the documented 58-byte file with width 0x20000000 and 32 bits-per-pixel) processed by the BMP decoder (ReadBMPImage in coders/bmp.c). The affected versions are 7.1.2-2 through 7.1.2-5 (the incomplete patch range), fixed in 7.1.2.8-r0 on Alpine and Magick.NET >= 14.9.0. Limiting factors: default-configured and 64-bit deployments are not exploitable, and impact is confined to a crash/denial of service with no confidentiality or integrity effect. |
| Impact | Signals point to a LOW real-world priority despite the 7.5 'High' CVSS. The CVSS vector (AV:N/AC:L/PR:N/UI:N) describes remote, unauthenticated, low-complexity access, and the impact is availability-only (C:N/I:N/A:H) - i.e. a denial-of-service crash, not code execution or data exposure. However, the authoritative GHSA advisory (GHSA-9pp9-cfwx-54rm) sharply narrows exploitability: the integer overflow in the BMP decoder is triggerable ONLY on 32-bit systems (size_t = 4 bytes; 64-bit systems are explicitly not vulnerable) AND ONLY when the default width/height/area resource limits have been manually raised. This means the CVSS AC:L understates true attack complexity - the real-world preconditions make this closer to AC:H, and I have assessed it accordingly below. Corroborating low-risk signals: EPSS is 0.08% (23rd percentile), it is NOT on the CISA KEV list, and the worst outcome is a process crash. The one elevating signal is that publicly available exploit code exists (a documented 58-byte PoC BMP). Net: a genuine but conditional DoS affecting a shrinking population of 32-bit deployments running non-default config - monitor and patch in routine cycles rather than emergency. |
| Exploit ScenarioDerived | An attacker uploads or submits a crafted 58-byte BMP file (width 0x20000000, 32bpp) to a service that uses ImageMagick for image processing on a 32-bit host configured with raised resource limits; the width×bits_per_pixel multiplication overflows a 32-bit size_t to zero, the incomplete BMPOverflowCheck fails to detect it, and processing proceeds with corrupted sizing values causing a crash/DoS. A public proof-of-concept BMP exists in the GHSA advisory. The low CVSS attack complexity is misleading because exploitation requires a 32-bit platform plus non-default resource limits. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Oct 19, 2026
Integer overflow in ImageMagick's BMP decoder (ReadBMPImage in coders/bmp.c) allows unauthenticated remote attackers to crash the image-processing process, producing a denial-of-service condition with no confidentiality or integrity impact. Exploitation is narrowly constrained: it requires a 32-bit build where size_t is four bytes, ImageMagick's default width/height/area resource limits to have been manually raised, and delivery of a crafted BMP (a 58-byte sample is documented) to the decoder - 64-bit and default-configured installations are not exploitable. Affected builds are ImageMagick 7.1.2-2 through 7.1.2-5, which carry an incomplete fix for the earlier CVE-2025-57803; the issue is resolved on Alpine Linux in 7.1.2.8-r0 and in Magick.NET 14.9.0. Publicly available exploit code exists, but there is no evidence of active exploitation in the wild and EPSS is a low 0.08% (23rd percentile), so real-world priority is low despite the 7.5 'High' CVSS base score.
Earlier versions of this analysis (1)
ImageMagick on Alpine Linux was patched in package version 7.1.2.8-r0, addressing an unspecified vulnerability. The nature, class, and impact of the underlying flaw are not disclosed in available intelligence - no CVSS vector, CWE, or vendor description beyond the fix notice has been published. With an EPSS score of 0.08% (23rd percentile), exploitation probability is currently low, and no public exploit or active exploitation has been identified at time of analysis.
RemediationAI
Upgrade to a release containing the corrected BMPOverflowCheck: ImageMagick 7.1.2.8-r0 or later on Alpine Linux (apk upgrade imagemagick), Magick.NET 14.9.0 or later for the Q16, Q16-HDRI, AnyCPU and x86 NuGet packages, or the corresponding Debian LTS package from the October 2025 announcement; the upstream fix is commit cea1693e2ded51b4cc91c70c54096cbed1691c00 and details are in advisory https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9pp9-cfwx-54rm. Where immediate upgrading is not possible, the single most effective control is to leave ImageMagick's default width, height and area resource limits in place - the exploit dimensions are rejected by stock limits, so any local tuning that raised those limits must be reverted, at the cost of refusing legitimately huge images. Running the service on 64-bit hardware or a 64-bit build removes the truncation entirely and is the strongest structural mitigation, though it requires re-platforming 32-bit embedded deployments. As a narrower stop-gap, restrict BMP handling for untrusted input by adding a policy.xml rule that disables the BMP coder (or limits its dimensions) in the processing profile used for uploads, accepting that legitimate BMP files will then fail to decode. Front-end validation of BMP header width/height/bits-per-pixel fields before handing files to ImageMagick adds defense in depth but should not be relied on as the sole control. Note that no vendor patch is listed as unavailable - fixes are released - so these workarounds are transitional only.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 6 packages in nuget
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is a CWE-190 integer overflow in the Windows BMP reader. In coders/bmp.c the code computes extent = image->columns * bmp_info.bits_per_pixel and then bytes_per_line = 4*((extent+31)/32). On 32-bit platforms, a header declaring width 0x20000000 with 32 bits per pixel makes the product 17,179,869,184, which truncates to zero in a 4-byte size_t; bytes_per_line therefore evaluates to 0, and the subsequent BMPOverflowCheck(0, rows) returns false because it validates the already-corrupted result rather than the multiplication itself. The decoder then proceeds with inconsistent geometry, leading to an out-of-bounds condition that surfaces as an AddressSanitizer abort or allocation failure - a crash, not memory corruption that yields code execution. The commit referenced (cea1693e2ded51b4cc91c70c54096cbed1691c00) adds a BMPOverflowCheck immediately after the columns/bits_per_pixel multiplication, closing the gap that the earlier CVE-2025-57803 fix left open. Because the arithmetic only truncates when size_t is 4 bytes, 64-bit systems are structurally immune, and because stock ImageMagick resource limits (width, height, area) reject the oversized dimensions before the multiply is reached, only deployments with manually inflated limits are reachable. The CPE data confirms the ImageMagick ImageMagick package as the affected component, with Magick.NET wrappers inheriting the vulnerable native library.
Know when Imagemagick gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Remote unauthenticated image submission (AV:N/PR:N/UI:N) but requires a 32-bit host with non-default resource limits, so AC:H; impact is crash-only, giving C:N/I:N/A:H.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
Alpine Linux: imagemagick fixed in 7.1.2.8-r0
Executive ViewAI
ImageMagick versions 7.1.2-2 through 7.1.2-5 contain a high-severity integer overflow in the BMP decoder that can crash image-processing services, but only on 32-bit builds where default width/height/area resource limits have been manually raised and crafted BMPs are accepted. Publicly available exploit code exists, yet exposure is narrow because 64-bit and default-configured deployments are not affected and EPSS is low; leadership should still ensure affected 32-bit image pipelines are patched to prevent service disruption.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Affected Products (CPE)NVD
More in Imagemagick
View allThe (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.
The (1) HTTP and (2) FTP coders in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allow remote attackers to conduct
The EPHEMERAL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to delete arbitrary fi
ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the palette uninitialized when proc
Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote attackers to cause a denial of serv
The LABEL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to read arbitrary files vi
The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbit
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
The ReadDCMImage function in DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
Unauthenticated attackers can write arbitrary files on a Ruby on Rails host and, when Active Storage uses the Disk servi
ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer
NVD
CVE.org
EPSS
GitHub
Exploit-DB