CVE-2026-25985
C# vulnerability analysis and mitigation

Overview

CVE-2026-25985 is a memory exhaustion vulnerability in ImageMagick's internal SVG decoder, classified as "Memory Allocation with Excessive Without Limits." A crafted SVG file containing a malicious element causes ImageMagick to attempt to allocate approximately 674 GB of memory, resulting in an out-of-memory abort and denial of service. The vulnerability 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. It was discovered via AFL++ fuzzing with afl-clang-lto instrumentation and AddressSanitizer, disclosed on February 23, 2026, and carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, Github Advisory).

Technical details

The root cause is classified under CWE-770 (Allocation of Resources Without Limits or Throttling) and CWE-789 (Memory Allocation with Excessive Size Value), meaning ImageMagick's SVG decoder trusts attacker-controlled size values from SVG file elements without enforcing upper bounds on memory allocation. An attacker can craft a malicious SVG file with a specially constructed element that, when parsed by the internal SVG decoder, triggers an allocation request of approximately 674 GB — far exceeding available system memory. The attack vector is network-based (AV:N), requires no privileges (PR:N) and no user interaction (UI:N), making it exploitable by any remote attacker who can cause a vulnerable ImageMagick instance to process a supplied SVG file. The vulnerability was identified by researcher petermalone and the fix is available in commit 1a51eb9 of the ImageMagick repository (GitHub Advisory, Github Advisory).

Impact

Successful exploitation results in an out-of-memory abort of the ImageMagick process, causing a denial of service with high availability impact. There is no confidentiality or integrity impact — the vulnerability cannot be used to read or modify data. Any application or service that processes SVG files from untrusted sources using a vulnerable ImageMagick version is at risk, including web applications that accept user-uploaded images, automated image processing pipelines, and content management systems (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify a target: Locate a web application, API, or service that accepts SVG file uploads or processes SVG images using a vulnerable version of ImageMagick (prior to 7.1.2-15 or 6.9.13-40).
  2. Craft a malicious SVG: Create an SVG file containing a specially crafted element (e.g., an element with an attribute or nested structure) that causes ImageMagick's internal SVG decoder to compute an excessively large memory allocation size (~674 GB).
  3. Submit the file: Upload or submit the crafted SVG to the target service through any available file upload mechanism, image conversion endpoint, or API that triggers ImageMagick processing.
  4. Trigger the vulnerability: When ImageMagick attempts to parse the SVG and allocate the excessive memory, the system's out-of-memory handler terminates the ImageMagick process, causing a denial of service for the affected service or application (GitHub Advisory).

Indicators of compromise

  • Logs: Application or system logs showing ImageMagick process crashes or out-of-memory (OOM) kill events (e.g., Linux kernel OOM killer messages referencing convert, magick, or related processes); web server error logs showing 500-series errors coinciding with SVG file processing requests.
  • Process: Sudden termination of ImageMagick worker processes (convert, magick, mogrify) without a normal exit code; repeated process restarts in image processing queues or daemons.
  • File System: Presence of unexpected or anomalous SVG files in upload directories, particularly those with unusual element structures or very large attribute values.
  • Network: Repeated upload requests containing SVG files from the same source IP, especially if followed by service disruptions or error responses.

Mitigation and workarounds

Upgrade ImageMagick to version 7.1.2-15 or later (7.x branch) or 6.9.13-40 or later (6.x branch). For Magick.NET users, upgrade to version 14.10.3 or later. As interim workarounds: disable SVG processing in ImageMagick if not required for your use case; implement input validation to reject SVG files from untrusted sources before they reach ImageMagick; and enforce memory resource limits (e.g., via ulimit, cgroups, or ImageMagick's own resource policy in policy.xml) to prevent a single process from exhausting system memory. Vendor patches are available for major Linux distributions including Red Hat, Debian, SUSE, and Amazon Linux 2 (GitHub Advisory, Github Advisory, Red Hat).

Community reactions

The vulnerability received standard coverage across Linux distribution security channels, with patches issued for Debian, SUSE, openSUSE, Red Hat Enterprise Linux, and Amazon Linux 2 shortly after disclosure. Tenable published multiple Nessus detection plugins (e.g., plugin IDs 299874, 301556, 301813) to identify vulnerable systems. Community reaction has been measured, consistent with a denial-of-service-only vulnerability with no public exploit. No notable researcher commentary or significant social media discussion beyond routine vulnerability tracking has been observed.

Additional resources


SourceThis report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-p5rm-jg5c-8c77MEDIUM6.1
  • C# logoC#
  • Microsoft.OpenApi.Kiota
NoYesJul 24, 2026
CVE-2026-62946MEDIUM5.1
  • C# logoC#
  • Magick.NET-Q16-AnyCPU
NoYesJul 24, 2026
CVE-2026-62363MEDIUM5
  • C# logoC#
  • Magick.NET-Q16-HDRI-OpenMP-arm64
NoYesJul 24, 2026
CVE-2026-62343MEDIUM4.7
  • C# logoC#
  • Magick.NET-Q16-OpenMP-arm64
NoYesJul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • @aws-cdk/aws-codebuild
NoYesJul 24, 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

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