Skip to main content

ImageMagick CVE-2025-62171

HIGH
Integer Overflow or Wraparound (CWE-190)
N/A vendor:alpine
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted 58-byte BMP to service
  2. Delivery
    Integer overflow in ReadBMPImage (extent calc)
  3. Exploit
    size_t truncates to zero on 32-bit
  4. Execution
    BMPOverflowCheck bypassed
  5. Persist
    Corrupted allocation/sizing
  6. Impact
    Decoder 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 May 27, 2026 - 22:47

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

nuget magick.net-q16-anycpu fix: 14.9.0
nuget magick.net-q16-hdri-anycpu fix: 14.9.0
nuget magick.net-q16-hdri-x86 fix: 14.9.0
nuget magick.net-q16-x86 fix: 14.9.0
nuget magick.net-q8-anycpu fix: 14.9.0
nuget magick.net-q8-x86 fix: 14.9.0

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

NVD PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

3
Analysis Updated
Oct 19, 2026 - 16:29 vuln.today
v2 - CVSS changed
PoC Detected
Oct 19, 2026 - 16:23 NVD
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9pp9-cfwx-54rm
CVSS changed
Oct 19, 2026 - 16:23 NVD
7.5 (HIGH)

DescriptionNVD

Alpine Linux: imagemagick fixed in 7.1.2.8-r0

Executive ViewAI

Why It Matters

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.

Business Impact: Low
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 77% exploitable
Prevalence
High
ImageMagick is a near-universal image library in web and server backends
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Low

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*
cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*
CVE-2016-3714 HIGH POC
8.4 May 05

The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.

CVE-2016-3718 MEDIUM POC
5.5 May 05

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

CVE-2016-3715 MEDIUM POC
5.5 May 05

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

CVE-2017-15277 MEDIUM POC
6.5 Oct 12

ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the palette uninitialized when proc

CVE-2016-5841 CRITICAL POC
9.8 Dec 13

Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote attackers to cause a denial of serv

CVE-2016-3717 MEDIUM POC
5.5 May 05

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

CVE-2016-5118 CRITICAL
9.8 Jun 10

The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbit

CVE-2016-5689 CRITICAL POC
9.8 Dec 13

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

CVE-2016-5690 CRITICAL POC
9.8 Dec 13

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

CVE-2016-5691 CRITICAL POC
9.8 Dec 13

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

CVE-2026-122006 CRITICAL POC
9.8 Nov 04

Unauthenticated attackers can write arbitrary files on a Ruby on Rails host and, when Active Storage uses the Disk servi

CVE-2017-14138 CRITICAL POC
9.8 Sep 04

ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy