CVE-2026-25796
C# vulnerability analysis and mitigation

Overview

CVE-2026-25796 is a memory leak vulnerability in ImageMagick's ReadSTEGANOImage() function (coders/stegano.c) that can be exploited to cause denial of service. The watermark Image object is not freed on three early-return paths, resulting in a definite memory leak of approximately 13.5KB or more per invocation. It affects ImageMagick versions prior to 7.1.2-15 (7.x branch) and prior to 6.9.13-40 (6.9.x branch), as well as Magick.NET NuGet packages prior to version 14.10.3. The vulnerability was published on February 23–24, 2026. The CVSS v3.1 base score is 5.3 (Moderate) per the GitHub Security Advisory, though some sources report 7.5 (High) (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 ReadSTEGANOImage() within coders/stegano.c, the watermark Image object allocated via AcquireImage()AcquireCriticalMemory()AcquireMagickMemory() is not freed when the function exits early on three distinct error paths, leaking approximately 13,512 bytes per call. An unauthenticated remote attacker can trigger this leak by repeatedly submitting crafted STEGANO-format image processing requests to any service backed by a vulnerable ImageMagick installation, with no privileges or user interaction required (GitHub Advisory, Github Advisory).

Impact

Successful exploitation results exclusively in an availability impact — there is no confidentiality or integrity risk. By repeatedly invoking the vulnerable STEGANO image decoder, an attacker can progressively exhaust the server's available memory, leading to service degradation, process crashes, or complete system failure. Applications and services that accept user-supplied images and process them with ImageMagick (e.g., web upload handlers, image conversion APIs) are particularly at risk (GitHub Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Reconnaissance: Identify services that accept image uploads or process images using ImageMagick (e.g., web applications with file upload functionality, image conversion APIs). Confirm the target is running a vulnerable version (ImageMagick < 7.1.2-15 or < 6.9.13-40).
  2. Craft malicious STEGANO image: Prepare a valid or malformed STEGANO-format image file that triggers one of the three early-return error paths in ReadSTEGANOImage(), causing the watermark object to be allocated but not freed.
  3. Repeated submission: Automate submission of the crafted image to the target service in a high-frequency loop (e.g., using curl or a scripted HTTP client), causing approximately 13.5KB of memory to leak per request.
  4. Memory exhaustion: After sufficient iterations, the server's available memory is depleted, resulting in service degradation, OOM kills, or a complete denial of service condition (GitHub Advisory).

Indicators of compromise

  • Network: High-volume HTTP requests submitting STEGANO-format image files to image processing endpoints; unusual sustained traffic from a single source IP targeting upload or conversion endpoints.
  • Logs: Application or web server logs showing repeated image processing requests with STEGANO format inputs; error messages from ImageMagick related to STEGANO decoding failures.
  • Process/System: Steadily increasing memory consumption by the ImageMagick process or the hosting application over time without corresponding release; OOM (Out of Memory) killer events in system logs (/var/log/syslog, dmesg) terminating ImageMagick-related processes.
  • File System: Presence of crafted STEGANO image files in upload directories that trigger processing errors.

Mitigation and workarounds

Upgrade ImageMagick to version 7.1.2-15 or later (7.x branch) or version 6.9.13-40 or later (6.9.x branch), which contain the fix. For Magick.NET users, upgrade to version 14.10.3 or later. If immediate patching is not possible, restrict network access to ImageMagick-backed services, implement rate limiting on image processing endpoints, and consider blocking or filtering STEGANO-format image inputs at the application layer. Distribution-specific patches have been issued for Debian, Ubuntu (USN-8127-1), SUSE/openSUSE, and Amazon Linux 2 (GitHub Advisory, Red Hat Bugzilla).

Community reactions

The vulnerability was reported by researcher ylwango613 and published by maintainer dlemstra via the ImageMagick GitHub Security Advisory on February 23, 2026. Red Hat tracked it via Bugzilla with medium severity. Multiple Linux distributions (Debian, Ubuntu, SUSE, Amazon Linux) issued security updates in the weeks following disclosure, indicating broad ecosystem attention. No notable social media controversy or significant researcher commentary beyond standard advisory coverage has been observed (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