CVE-2026-25637
C# vulnerability analysis and mitigation

Overview

CVE-2026-25637 is a memory leak vulnerability in the ASHLAR image writer component of ImageMagick, classified as Moderate severity. It affects ImageMagick versions prior to 7.1.2-15 and Magick.NET (the .NET wrapper) versions prior to 14.10.3. The vulnerability was discovered by researcher ylwango613 and disclosed on February 23–24, 2026, via a GitHub Security Advisory (GHSA-gm37-qx7w-p258). It carries a CVSS v3.1 base score of 5.3 (Medium) (Github Advisory, Red Hat Bugzilla).

Technical details

The root cause is CWE-401 (Missing Release of Memory after Effective Lifetime) and CWE-772 (Missing Release of Resource after Effective Lifetime). In coders/ashlar.c, a DrawInfo object was allocated via CloneDrawInfo() before a conditional block, but was only used inside that block — meaning if the label was NULL or processing took certain paths, the allocated object was never freed. The fix, committed as 30ce0e8, moves the DrawInfo allocation inside the conditional block and adds a corresponding DestroyDrawInfo() call to ensure proper cleanup. An attacker exploits this by submitting a crafted image that triggers repeated allocations of small, unreleased heap objects during ASHLAR encoding (GitHub Commit, Github Advisory).

Impact

The vulnerability's impact is limited to availability — there is no confidentiality or integrity impact. By repeatedly submitting crafted images to a service backed by a vulnerable ImageMagick instance, an unauthenticated remote attacker can cause the process to consume increasing amounts of heap memory until the system exhausts available memory, resulting in application unresponsiveness or a crash (denial of service). Valgrind analysis confirmed definite memory losses of 3,408 bytes across 3 blocks and indirect losses of 88,885 bytes across 30 blocks per processing run (Github Advisory, Red Hat Bugzilla).

Mitigation and workarounds

The primary remediation is to upgrade ImageMagick to version 7.1.2-15 or later, which contains the patch for this vulnerability. Users of the .NET wrapper Magick.NET should upgrade to version 14.10.3 or later. If immediate patching is not feasible, consider restricting network access to services that process user-supplied images via ImageMagick, or implementing input validation to reject ASHLAR-format image files. Distribution-specific patches have been issued for openSUSE, Debian, and Ubuntu (Github Advisory, Magick.NET Release).

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