Skip to main content

Magick.NET CVE-2026-46557

MEDIUM
Uncontrolled Recursion (CWE-674)
2026-05-18 https://github.com/ImageMagick/ImageMagick GHSA-rcr6-g7jc-f57g
6.2
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
    Supply crafted fx expression as input
  2. Delivery
    Application passes input to Magick.NET fx evaluator
  3. Exploit
    Missing depth check triggers uncontrolled recursion
  4. Execution
    Call stack exhausted
  5. Impact
    Process crash (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

The vulnerability is triggered specifically through the fx operation in Magick.NET - exploitation requires that attacker-controlled input reach the fx expression evaluator within the application. Applications that invoke fx with fully trusted, hardcoded expressions are not exploitable in practice. The local attack vector (AV:L) in the CVSS vector indicates that exploitation occurs in a local context, though in practice any application that accepts untrusted image metadata or expression strings and passes them to the fx API could be exposed even in networked scenarios via that application's input path. No authentication is required per PR:N in the CVSS vector. Non-default use of the fx API with external input is the limiting factor - standard image read/write operations that do not invoke fx are not affected.

Impact

CVSS 6.2 Medium with vector AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H signals a locally exploitable denial-of-service with no lateral impact beyond availability. The local attack vector (AV:L) is the primary risk-limiting factor - exploitation requires either local system access or the ability to supply attacker-controlled input to an application that invokes the Magick.NET fx evaluator. No privileges are required (PR:N), and no user interaction is needed once input reaches the vulnerable code path. EPSS data was not provided in the intelligence feed, and the CVE is not listed in CISA KEV, indicating no confirmed widespread active exploitation. No public exploit code has been identified. Real-world priority is moderate for .NET applications that accept user-supplied fx expressions or process untrusted image files with fx transformations; it is low for applications where fx input is fully controlled by the application itself.

Exploit ScenarioDerived

An attacker with the ability to supply crafted input to a .NET application using Magick.NET constructs a deeply nested fx expression argument - for example, a formula referencing itself or chaining recursive sub-expressions beyond the stack depth. When the application passes this argument to the Magick.NET fx evaluator without first upgrading to 14.13.1, the evaluator recurses without bound, overflows the thread stack, and crashes the host process. No public exploit code has been identified at time of analysis, but the attack primitive is straightforward to reproduce from the advisory description.

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

Stack overflow in the Magick.NET fx expression evaluator affects all Q16 and HDRI NuGet package variants prior to version 14.13.1. The root cause is a missing recursion depth check in the fx operation: a crafted argument can drive the evaluator into uncontrolled recursion, exhausting the call stack and crashing the host process. Impact is limited to availability (denial of service); no confidentiality or integrity exposure is present, and no public exploit or CISA KEV listing exists at time of analysis.

RemediationAI

Upgrade all affected Magick.NET NuGet packages to version 14.13.1 or later; this is the vendor-released patch confirmed by GitHub Security Advisory GHSA-rcr6-g7jc-f57g. Update via NuGet package manager using 'dotnet add package Magick.NET-Q16-AnyCPU --version 14.13.1' (substitute the specific variant in use). For applications that cannot be patched immediately, the primary compensating control is to restrict or sanitize fx expression input before it reaches the Magick.NET API - specifically, reject or strip deeply nested recursive expressions through application-layer input validation. Additionally, sandboxing the image-processing process (e.g., running it in a separate low-privilege container or process with resource limits such as ulimit -s on Linux) can contain the impact of a crash to availability without affecting the wider application. Neither workaround eliminates the underlying flaw, and patching to 14.13.1 remains the definitive remediation.

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

The fx operation is ImageMagick's built-in mathematical expression and formula evaluator, used to apply pixel-level transformations. CWE-674 (Uncontrolled Recursion) identifies the root cause: the evaluator lacks a depth counter or guard to cap recursive expression parsing, so a pathologically nested crafted argument can drive call-stack depth to OS limits and trigger a stack overflow. The affected packages are the official .NET bindings for ImageMagick distributed via NuGet - specifically all Q16 (16-bit quantum depth) and HDRI (high dynamic range) variants across x86, x64, arm64, AnyCPU, and OpenMP-enabled builds. The vulnerability exists in the underlying ImageMagick C library, surfaced through all of these .NET wrapper packages.

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 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE MEDIUM
Red Hat 5.5 LOW

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

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

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

DescriptionCVE.org

Due to a missing depth check a stack overflow can occur in the fx operation by passing a crafted argument.

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

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

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 Not-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