Skip to main content

Magick.NET CVE-2026-45359

MEDIUM
Out-of-bounds Read (CWE-125)
2026-05-18 https://github.com/ImageMagick/ImageMagick GHSA-vhrh-72hq-w8m7
5.7
CVSS 3.1 · Vendor: https://github.com/ImageMagick/ImageMagick
View

Attack ChainAIDerived

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

  1. Access
    Gain local access to image processing host
  2. Delivery
    Craft input with invalid connected-components:keep-top define
  3. Exploit
    Submit crafted input to Magick.NET pipeline
  4. Execution
    Trigger heap buffer over-read in connected components operation
  5. Impact
    Disclose heap memory contents to attacker

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

Exploitation requires local access to the system or application processing pipeline (CVSS AV:L), meaning the attacker must be able to supply input - directly or indirectly - to a running Magick.NET process on the same host. High attack complexity (CVSS AC:H) further requires that heap layout conditions are favorable at the time of the over-read, which is non-deterministic and reduces exploitation reliability across attempts. The critical enabling condition is that the application must pass a user-controlled or externally-influenced value as the connected-components:keep-top define to ImageMagick's connected components operation without prior validation. No privileges are required (CVSS PR:N) and no user interaction is needed (CVSS UI:N) beyond the ability to submit input to the processing pipeline. Exploitation is limited by: (1) the local attack vector, which rules out remote network exploitation; (2) high complexity due to heap layout dependency; (3) absence of integrity impact, confining damage to information disclosure and minor availability degradation.

Impact

The CVSS base score of 5.7 (Medium) reflects meaningful but constrained risk. The vector AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L breaks down as: local attack surface (significantly limits exposed population), high attack complexity (heap layout dependency reduces reliable exploitation), no privileges required (lowers the bar within the local context), no user interaction, and high confidentiality impact (heap memory disclosure). EPSS data was not provided in the source intelligence; given the local vector and high complexity, opportunistic widespread exploitation is unlikely. No CISA KEV listing and no known public exploit code exist at time of analysis, further supporting a moderate - rather than critical - real-world priority. The primary realistic threat is in scenarios where untrusted image processing pipelines run on shared infrastructure (e.g., multi-tenant image conversion services), where a local attacker could craft malicious define values to extract heap memory from co-located processes. For isolated, single-tenant deployments processing only trusted input, the practical risk is low despite the High confidentiality CVSS sub-score. Patch availability (14.13.1) with a clear fix version makes remediation straightforward, and patching should be prioritized for any deployment accepting externally-controlled ImageMagick define parameters.

Exploit ScenarioDerived

An attacker with local access to a system running a Magick.NET-based image processing application supplies a crafted image or processing request that sets the connected-components:keep-top define to an invalid value (e.g., a negative integer, zero, or an excessively large number). When the application invokes the connected components operation, the library reads beyond the allocated heap buffer, potentially disclosing adjacent heap memory contents - which may include sensitive data such as cryptographic material, authentication tokens, or image data from other users. No public exploit code exists at time of analysis, but the over-read is triggered by a single malformed parameter with no authentication required beyond local access.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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

AnalysisAIv1 – May 18, 2026

Heap buffer over-read in Magick.NET's connected components operation exposes process memory when an attacker or untrusted input supplies a malformed connected-components:keep-top define value. All Magick.NET NuGet package variants (Q16, Q16-HDRI, OpenMP, arm64, x64, x86, AnyCPU) prior to version 14.13.1 are affected. Exploitation yields high confidentiality impact - enabling partial or full disclosure of heap memory contents - with low availability impact and no integrity impact; no public exploit and no CISA KEV listing have been identified at time of analysis.

RemediationAI

Upgrade all Magick.NET NuGet packages to version 14.13.1 or later; this is the vendor-confirmed fixed release per GHSA-vhrh-72hq-w8m7 (https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-vhrh-72hq-w8m7). Update via NuGet package manager or dotnet add package Magick.NET-Q16-AnyCPU --version 14.13.1 (substituting the appropriate variant for your deployment). If immediate patching is not possible, apply the following compensating controls: restrict or sanitize the connected-components:keep-top define value at the application layer before passing it to Magick.NET, rejecting any non-integer or out-of-range values - this eliminates the invalid input pathway without requiring a library update, though it adds application-layer validation burden. Additionally, isolate image-processing workloads in sandboxed or containerized environments with minimal process privileges to limit the impact of any heap memory disclosure. Do not rely on OS-level ASLR alone as a sufficient control given the local attack vector.

Affected Packages

nuget magick.net-q16-anycpu fix: 14.13.1
nuget magick.net-q16-arm64 fix: 14.13.1
nuget magick.net-q16-hdri-anycpu fix: 14.13.1
nuget magick.net-q16-hdri-arm64 fix: 14.13.1
nuget magick.net-q16-hdri-openmp-arm64 fix: 14.13.1
nuget magick.net-q16-hdri-openmp-x64 fix: 14.13.1
nuget magick.net-q16-hdri-x64 fix: 14.13.1
nuget magick.net-q16-hdri-x86 fix: 14.13.1
nuget magick.net-q16-openmp-arm64 fix: 14.13.1
nuget magick.net-q16-openmp-x64 fix: 14.13.1
nuget magick.net-q16-x64 fix: 14.13.1
nuget magick.net-q16-x86 fix: 14.13.1
nuget magick.net-q8-anycpu fix: 14.13.1
nuget magick.net-q8-arm64 fix: 14.13.1
nuget magick.net-q8-openmp-arm64 fix: 14.13.1
nuget magick.net-q8-openmp-x64 fix: 14.13.1
nuget magick.net-q8-x64 fix: 14.13.1
nuget magick.net-q8-x86 fix: 14.13.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 18 packages in nuget

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Magick.NET is a .NET wrapper library around the ImageMagick image processing engine, distributed across multiple NuGet package variants differentiated by color depth (Q16, Q16-HDRI), threading model (OpenMP), and CPU architecture (AnyCPU, x64, arm64, x86). The connected components operation segments an image into labeled regions; the connected-components:keep-top define is a user-supplied parameter that controls how many top components are retained. CWE-125 (Out-of-bounds Read) identifies the root cause: the library fails to validate this parameter before using it to index into a heap-allocated buffer, permitting a read beyond the buffer's allocated bounds. The over-read occurs on the heap - a more controlled memory region than the stack - making reliable arbitrary-offset reads feasible depending on heap layout, which can leak sensitive in-process data (e.g., keys, tokens, adjacent image data). The CVSS vector AV:L confirms the triggering input must reach the process locally (e.g., via a file path or piped input on the same host), while AC:H indicates exploitation requires favorable heap-layout conditions, reducing repeatability.

Know when the next one hits your stack

  • 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 (https://github.com/ImageMagick/ImageMagick) PRIMARY 5.7 MEDIUM
AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
SUSE MEDIUM
Red Hat 7.1 HIGH

Primary rating from Vendor (https://github.com/ImageMagick/ImageMagick).

CVSS VectorVendor: https://github.com/ImageMagick/ImageMagick

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

DescriptionCVE.org

An invalid connected-components:keep-top value could result in a heap buffer over-read when performing the connected components operation.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
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

pkg:nuget/magick.net-q16-anycpu
pkg:nuget/magick.net-q16-hdri-anycpu
pkg:nuget/magick.net-q16-hdri-openmp-arm64
pkg:nuget/magick.net-q16-hdri-openmp-x64
pkg:nuget/magick.net-q16-hdri-arm64
pkg:nuget/magick.net-q16-hdri-x64
pkg:nuget/magick.net-q16-hdri-x86
pkg:nuget/magick.net-q16-openmp-arm64
pkg:nuget/magick.net-q16-openmp-x64
pkg:nuget/magick.net-q16-arm64
pkg:nuget/magick.net-q16-x64
pkg:nuget/magick.net-q16-x86
pkg:nuget/magick.net-q8-anycpu
pkg:nuget/magick.net-q8-openmp-arm64
pkg:nuget/magick.net-q8-openmp-x64
pkg:nuget/magick.net-q8-arm64
pkg:nuget/magick.net-q8-x64
pkg:nuget/magick.net-q8-x86

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Desktop Applications 15 SP7 Affected
SUSE Linux Enterprise Module for Development Tools 15 SP7 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP7 Not-Affected

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