CVE-2026-25989
C# vulnerability analysis and mitigation

Overview

CVE-2026-25989 is a denial-of-service vulnerability in ImageMagick's internal SVG decoder caused by an off-by-one boundary check error and incorrect numeric type conversion. A crafted SVG file can bypass a guard condition (using > instead of >=) and reach an undefined (size_t) cast, triggering a crash. It affects ImageMagick versions prior to 6.9.13-40 (6.x branch) and prior to 7.1.2-15 (7.x branch), as well as Magick.NET NuGet packages prior to version 14.10.3. Disclosed on February 23–24, 2026, it carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is an off-by-one error (CWE-193) in the SVG parsing code, where a boundary check uses a strict greater-than (>) comparison instead of greater-than-or-equal (>=), allowing the guard to be bypassed. This leads to an incorrect conversion between numeric types (CWE-681) — specifically an undefined cast to size_t — which can trigger integer overflow or wraparound behavior (CWE-190). The vulnerability requires no authentication or user interaction; an attacker only needs to supply a maliciously crafted SVG file to any system that processes it with a vulnerable ImageMagick version. The fix is referenced in commit 5a545ab in the ImageMagick repository (GitHub Advisory, Github Advisory).

Impact

Successful exploitation results in a denial-of-service condition by crashing the ImageMagick process. There is no impact on confidentiality or integrity — the vulnerability is limited to availability (High). Any service or application that relies on ImageMagick to process untrusted SVG input (e.g., web applications, image conversion pipelines, document processors) is at risk of disruption through repeated submission of crafted files (GitHub Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Identify target: Locate a service or application that accepts SVG file uploads or processes SVG images using a vulnerable version of ImageMagick (< 7.1.2-15 or < 6.9.13-40).
  2. Craft malicious SVG: Create a specially crafted SVG file designed to trigger the off-by-one boundary check bypass in the internal SVG decoder, causing the guard condition to be bypassed and reaching the undefined (size_t) cast.
  3. Submit the file: Upload or submit the crafted SVG to the target application's image processing endpoint (e.g., a file upload form, API endpoint, or image conversion service).
  4. Trigger crash: ImageMagick processes the file, the boundary check is bypassed, the undefined cast is reached, and the process crashes — resulting in a denial-of-service condition for the affected service.
  5. Repeat for sustained DoS: Repeatedly submit the crafted file to keep the service unavailable if it auto-restarts (GitHub Advisory).

Indicators of compromise

  • Logs: Unexpected ImageMagick process crashes or core dumps in system logs (e.g., /var/log/syslog, application error logs) correlated with SVG file processing events.
  • File System: Presence of crafted or malformed SVG files in upload directories or temporary processing directories.
  • Process: Repeated abnormal termination of ImageMagick worker processes (e.g., convert, magick) shortly after receiving SVG input.
  • Network: Unusual volume of SVG file submissions to image processing endpoints from a single or small set of source IPs.

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, restrict network access to ImageMagick-based services, implement input validation to reject malformed or suspicious SVG files before processing, and monitor for unexpected ImageMagick process crashes. Distribution-specific patches have been issued for Debian, SUSE/openSUSE, and other Linux distributions (GitHub Advisory, Red Hat Bugzilla).

Community reactions

The vulnerability was reported by researcher petermalone and published by maintainer dlemstra via the ImageMagick GitHub security advisory on February 23, 2026. Red Hat tracked the issue via Bugzilla and assessed it as medium severity. openSUSE and Debian issued security update announcements for their respective distributions. Social media coverage was limited, with brief mentions on Bluesky and security news aggregators (GitHub Advisory, Red Hat Bugzilla).

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