CVE-2026-25971: 
C# vulnerability analysis and mitigation

Overview

CVE-2026-25971 is a stack overflow vulnerability in ImageMagick caused by uncontrolled recursion when processing Magick Scripting Language (MSL) files with circular references. It affects ImageMagick versions prior to 7.1.2-15 (7.x branch) and prior to 6.9.13-40 (6.x branch), as well as Magick.NET NuGet packages prior to version 14.10.3. The vulnerability was published on February 23–24, 2026, with patches released simultaneously. The GitHub Security Advisory assigns a CVSS v3.1 score of 6.2 (Moderate) with a local attack vector, while Feedly's aggregated data reflects a higher estimate of 9.8 (Critical) based on network accessibility of affected services (Github Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified as CWE-674 (Uncontrolled Recursion) and CWE-787 (Out-of-bounds Write). ImageMagick's ProcessMSLScript function fails to detect circular references between MSL files: when a crafted .msl file references another MSL that in turn references the first, the call chain MSLStartElement → ReadImage → ReadMSLImage → ProcessMSLScript → xmlParseChunk → xmlParseTryOrFinish → MSLStartElement recurses indefinitely, exhausting the process stack and triggering a fatal signal (SIGSEGV/SIGABRT). The vulnerability requires no authentication or user interaction beyond supplying a malicious MSL file to an ImageMagick-processing service (Github Advisory, Github Advisory).

Impact

Successful exploitation results in a denial of service (DoS) by crashing the ImageMagick process via stack exhaustion. Confidentiality and integrity are not directly impacted; the primary consequence is availability loss for any service relying on ImageMagick for image processing (e.g., web applications, media pipelines). In multi-tenant or shared environments, repeated crashes could disrupt service for all users of the affected system (Github Advisory, Red Hat Bugzilla).

Exploitability

No public proof-of-concept exploit code has been observed, and there is no evidence of in-the-wild exploitation as of the time of reporting (Github Advisory). The EPSS score is approximately 0.045% (14th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported.

Exploitation steps

  1. Craft a malicious MSL file: Create a file a.msl that contains an MSL <image> element referencing a second MSL file b.msl, and configure b.msl to reference a.msl back, establishing a circular dependency.
  2. Deliver the file to the target: Submit the crafted a.msl to any service or endpoint that passes user-supplied files to ImageMagick for processing (e.g., an image upload endpoint, a CLI wrapper, or a batch processing pipeline).
  3. Trigger processing: The service invokes magick a.msl or equivalent, causing ImageMagick to enter the recursive call chain: MSLStartElement → ReadImage → ReadMSLImage → ProcessMSLScript → xmlParseChunk → xmlParseTryOrFinish → MSLStartElement.
  4. Stack exhaustion: The unbounded recursion consumes the process stack, resulting in a fatal signal (stack overflow/SIGSEGV), crashing the ImageMagick process and causing a denial of service for the affected service (Github Advisory).

Indicators of compromise

  • Logs: ImageMagick process logs or application error logs showing AddressSanitizer:DEADLYSIGNAL or UNKNOWN SIGNAL errors; stack traces referencing MSLStartElement, ReadMSLImage, ProcessMSLScript, or xmlParseChunk in rapid succession.
  • Process: Repeated crashes or restarts of the ImageMagick process (magick, convert, or application worker processes); abnormal process termination with signal SIGSEGV or SIGABRT.
  • File System: Presence of crafted .msl files in upload directories or temporary processing folders that contain cross-referencing <image> elements pointing to other .msl files.
  • Network: Unusual volume of image processing requests (particularly MSL file uploads) to web application endpoints, especially if correlated with service availability degradation.

Mitigation and workarounds

Upgrade ImageMagick to version 7.1.2-15 (7.x branch) or 6.9.13-40 (6.x branch), which include a patch adding circular reference detection in MSL processing. For Magick.NET users, upgrade to version 14.10.3 or later. If immediate patching is not feasible, disable MSL processing capabilities if not operationally required, and implement network-level or application-level controls to restrict untrusted file uploads to ImageMagick services. Monitor for unexpected ImageMagick process crashes as a potential indicator of exploitation attempts (Github Advisory, Red Hat Bugzilla).

Community reactions

The vulnerability was reported by security researcher unbengable12 and patched promptly by the ImageMagick maintainer dlemstra on February 23, 2026. Downstream Linux distributions including SUSE, openSUSE, Debian, and Amazon Linux 2 have issued security advisories and updated packages. No significant public controversy or notable social media discussion has been observed beyond routine vulnerability tracking and distribution-level patch announcements (Github Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

imagemagick: 8:6.9.11.60+dfsg-1.6+deb12u9

Fixed

sid

imagemagick: 8:7.1.2.15+dfsg1-1

Fixed

trixie

imagemagick: 8:7.1.1.43+dfsg1-1+deb13u6

Fixed

Ubuntu

Unknown

bionic (esm-infra)

imagemagick

Unknown

devel

imagemagick

Unknown

focal (esm-apps)

imagemagick

Unknown

jammy

imagemagick

Unknown

jammy (esm-apps)

imagemagick

Unknown

noble

imagemagick

Unknown

noble (esm-apps)

imagemagick

Unknown

resolute

imagemagick

Unknown

RHEL / CentOS

Unknown

Alpine

Fixed

edge

imagemagick: 7.1.2.15-r0

Fixed

v3.22

imagemagick: 7.1.2.15-r0

Fixed

v3.23

imagemagick: 7.1.2.15-r0

Fixed

Source: This report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-96235HIGH8.8
  • C# logoC#
  • Microsoft.WindowsDesktop.App.Runtime.win-x64
NoYesOct 13, 2026
CVE-2026-96236HIGH7.5
  • C# logoC#
  • dotnet6
NoYesOct 13, 2026
CVE-2026-62847MEDIUM6
  • C# logoC#
  • Metalama.Tool
NoYesOct 14, 2026
CVE-2026-92707MEDIUM5.3
  • C# logoC#
  • dotnet10-runtime
NoYesOct 15, 2026
CVE-2026-96234MEDIUM5.3
  • C# logoC#
  • Microsoft.WindowsDesktop.App.Runtime.win-arm64
NoYesOct 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management