Skip to main content

ImageMagick CVE-2025-66628

HIGH
Out-of-bounds Read (CWE-125)
N/A vendor:alpine
7.5
CVSS 3.1 · Vendor: vendor:alpine
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted TIM image to 32-bit ImageMagick
  2. Delivery
    Overflow image_size=2*width*height in ReadTIMImage
  3. Exploit
    Undersized heap allocation via AcquireQuantumMemory
  4. Execution
    Out-of-bounds read past buffer
  5. Impact
    Disclose adjacent heap memory

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires ImageMagick (or a wrapper such as Magick.NET) to parse an attacker-supplied PSX TIM image via the ReadTIMImage code path, AND the binary must be a 32-bit build (or one where size_t is 32-bit) - the advisory explicitly states the overflow does not occur on 64-bit systems. Exploitation is limited by: (1) the 32-bit-only precondition, which excludes the majority of modern 64-bit production deployments; (2) the need for the target to actually process a TIM-format file, which is an uncommon format; (3) impact being confined to memory disclosure with no code execution or crash claimed. No authentication or user interaction is required where a service auto-processes uploaded images.

Impact

This is a genuine but low-priority issue. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/C:H/I:N/A:N, base 7.5) rates it High on the strength of a network-reachable, unauthenticated confidentiality breach - appropriate for an image library like ImageMagick that is frequently invoked server-side on attacker-supplied uploads. However, multiple corroborating signals point to modest real-world risk: EPSS is only 0.05% (15th percentile), there is no CISA KEV listing, and no public proof-of-concept exploit is referenced. Most decisively, the GHSA advisory (GHSA-6hjr-v6g4-3fm8) explicitly scopes the integer overflow in ReadTIMImage (coders/tim.c, image_size=2*width*height) to 32-bit systems or builds where size_t is 32-bit; on the 64-bit platforms that dominate modern production deployments the multiplication does not overflow and the flaw is not reachable. The impact is also limited to out-of-bounds READ / memory disclosure (CWE-125) - no integrity or availability impact is claimed - so the 7.5 score is arguably generous for the typical 64-bit environment. Net: a real, patched confidentiality bug worth remediating in the normal patch cycle, but not an emergency, and largely moot outside 32-bit builds.

Exploit ScenarioDerived

An attacker crafts a malicious PSX TIM image with large 16-bit width/height header values and submits it to a service (or user) that processes images through ImageMagick on a 32-bit build. The integer overflow in image_size yields an undersized heap allocation, and subsequent dimension-driven operations read past the buffer, disclosing adjacent heap memory. No public exploit code is identified at time of analysis, and the flaw is not exploitable on standard 64-bit deployments.

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

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

Alert me

AnalysisAIv2 – Sep 25, 2026

An out-of-bounds read in ImageMagick's PSX TIM image decoder allows unauthenticated remote attackers to disclose heap memory contents, but only where the binary is a 32-bit build (or otherwise has a 32-bit size_t). The root cause is an unchecked 'image_size = 2 * width * height' calculation in ReadTIMImage that can wrap to a small value, so an attacker must be able to get the target - ImageMagick itself or a wrapper such as Magick.NET - to parse a hostile TIM file. No public exploit code or active exploitation has been identified, EPSS is negligible (0.05%, 15th percentile), and the independent assessment characterises this as a genuine but low-priority issue: impact is memory disclosure only (no code execution or crash claimed) and the 32-bit precondition excludes most modern 64-bit production deployments. Vendor fixes are available, including Alpine's imagemagick 7.1.2.12-r0 and Magick.NET 14.10.0.

Earlier versions of this analysis (1)
v1 May 27, 2026 - 22:48

ImageMagick received a security fix in Alpine Linux package version 7.1.2.12-r0, addressing an unspecified vulnerability in the image processing software. The vulnerability details - including attack vector, impact, and root cause - have not been publicly disclosed by the reporter (Alpine Linux vendor). With an EPSS score of 0.05% (15th percentile), exploitation probability is currently very low, and no public exploit or CISA KEV listing has been identified at time of analysis.

RemediationAI

Apply the vendor fixes: Alpine Linux users should upgrade the imagemagick package to 7.1.2.12-r0 or later (apk upgrade imagemagick), .NET consumers of Magick.NET should upgrade to 14.10.0 or later, and upstream ImageMagick builds should move to the release containing the fix referenced by the advisory GHSA-6hjr-v6g4-3fm8 (https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8). Because the flaw is confined to 32-bit builds, migrating affected services to a 64-bit ImageMagick binary eliminates the vulnerable code path entirely; this is the most robust compensating control where an immediate upgrade is not possible, with the trade-off of a platform migration rather than a configuration change. Alternatively, disable the TIM coder entirely via an ImageMagick policy.xml entry (a coder policy setting rights="none" for TIM) so hostile TIM files are rejected before ReadTIMImage runs - the trade-off is that legitimate Photoshop/PlayStation TIM images can no longer be processed. Where policies cannot be changed, restrict who can submit images to the processing endpoint (require authentication, cap upload size, or validate content type) to reduce exposure, though this does not fix the underlying defect. Note that patching is the only option that removes the out-of-bounds read rather than avoiding it, and that the referenced Magick.NET commit is an upstream fix for that wrapper while the exact corresponding upstream ImageMagick tagged release for non-Alpine distributions should be confirmed against the linked advisory.

Affected Packages

nuget magick.net-q16-anycpu fix: 14.10.0
nuget magick.net-q16-hdri-anycpu fix: 14.10.0
nuget magick.net-q16-hdri-x86 fix: 14.10.0
nuget magick.net-q16-x86 fix: 14.10.0
nuget magick.net-q8-anycpu fix: 14.10.0
nuget magick.net-q8-x86 fix: 14.10.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 vulnerability lives in coders/tim.c in ImageMagick's TIM (PlayStation/PSX texture) image parser. ReadTIMImage reads the file's 16-bit little-endian width and height via ReadBlobLSBShort, then computes image_size = 2 * width * height with no overflow check before calling AcquireQuantumMemory to size a heap buffer. With maximum dimensions (e.g. 65535 x 65535), the product is roughly 8.6 billion, which fits in a 64-bit size_t but wraps in a 32-bit size_t, yielding a very small allocation; subsequent decoding operations trust the un-wrapped dimensions and read past the end of the buffer, producing out-of-bounds reads that can leak process memory. The advisory is explicit that the overflow does not occur on 64-bit systems, which is why the CPE range (cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*) is broad but real-world exposure is narrower. The defect is classified CWE-125 (Out-of-Bounds Read), rooted in an integer overflow of the CWE-190 class. Attack surface is any service that automatically processes user-supplied images (thumbnailers, image-conversion APIs, upload pipelines) and is built 32-bit; the managed Magick.NET wrapper is affected because it bundles the native ImageMagick library, with the Q16 and Q16-HDRI AnyCPU and x86 packages fixed in 14.10.0.

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

Vendor (vendor:alpine) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

AV:N via server-side image processing and PR:N/UI:N for auto-processed uploads, but AC:H because exploitation requires a 32-bit build; only confidentiality (memory disclosure) is affected.

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

Primary rating from Vendor (vendor:alpine).

CVSS VectorVendor: vendor:alpine

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

Lifecycle Timeline

2
Analysis Updated
Sep 25, 2026 - 23:27 vuln.today
v2 - CVSS changed
CVSS changed
Sep 25, 2026 - 23:22 NVD
7.5 (HIGH)

DescriptionCVE.org

Alpine Linux: imagemagick fixed in 7.1.2.12-r0

Executive ViewAI

Why It Matters

A memory-disclosure flaw in ImageMagick's TIM image decoder could allow an attacker who can feed a crafted image file to an image-processing service to read small fragments of that process's heap memory, but only where the binary is a 32-bit build. Because the vast majority of production workloads today run 64-bit binaries, the realistic exposure for our image-handling services, build pipelines, and any Magick.NET-based applications is narrow, and no public exploit or active exploitation has been observed. Leadership should care mainly because ImageMagick is a pervasive transitive dependency across our application estate, so a low-severity issue in one component can surface in many teams' inventories and warrants coordinated tracking rather than urgent escalation.

Business Impact: Low
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Prevalence
High
ImageMagick is a ubiquitous image library, but this path is 32-bit-only
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 No
EPSS 0.0%
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
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Low

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

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