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

Overview

CVE-2026-25576 is a heap buffer over-read vulnerability in ImageMagick affecting multiple raw image format coders (BGR, CMYK, GRAY, RAW, RGB, YCbCr). The flaw exists in 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 prior to version 14.10.3. It was disclosed on February 23–24, 2026, via a GitHub Security Advisory (GHSA-jv4p-gjwq-9r2j). The vulnerability carries a CVSS v3.1 base score of 5.1 (Moderate) per the GitHub Advisory, or 5.5 (Medium) per NVD scoring (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is an out-of-bounds read (CWE-125) and heap-based buffer over-read (CWE-122) in multiple raw image format handlers within ImageMagick's coders — specifically bgr.c, cmyk.c, gray.c, raw.c, rgb.c, and ycbcr.c. The vulnerability is triggered when an image is processed with -extract dimensions larger than the -size dimensions: the pixel-copying loop iterates using image->columns (the larger extract dimension) rather than the smaller canvas_image->columns, causing reads beyond the bounds of the heap-allocated canvas buffer. The fix introduces a columns variable set to MagickMin(image->columns, canvas_image->columns) and uses it as the loop bound, preventing over-read (GitHub Commit, GitHub Advisory). Exploitation requires local access and the ability to supply a crafted raw image file with mismatched dimensions.

Impact

Successful exploitation allows an attacker to read out-of-bounds heap memory, potentially disclosing sensitive information present in the process's heap at the time of image processing. The impact is limited to confidentiality — there is no integrity or availability impact. The attack vector is local, meaning the attacker must have the ability to supply a crafted image to a vulnerable ImageMagick process, which limits the scope of exposure but is relevant in shared hosting, image processing pipelines, or web applications that process user-supplied raw image files (GitHub Advisory, Red Hat Bugzilla).

Exploitability

There is no public proof-of-concept exploit and no evidence of active in-the-wild exploitation as of the time of disclosure (GitHub Advisory). The EPSS score is approximately 0.006% (0th percentile), indicating a very low probability of exploitation in the near term. 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 raw image file: Create a raw image file (e.g., BGR, CMYK, GRAY, or RAW format) where the -extract dimensions (width/height) are set larger than the -size dimensions, causing a mismatch between the canvas buffer size and the expected pixel read count.
  2. Deliver the image to the target: Place the crafted image in a location accessible to a vulnerable ImageMagick process — for example, upload it to a web application that processes user-supplied images, or provide it directly on a shared system.
  3. Trigger image processing: Cause ImageMagick to process the crafted file using a command such as convert -size WxH -extract W2xH2 malicious.bgr output.png, where W2 > W and H2 > H.
  4. Observe heap memory disclosure: The vulnerable pixel-copying loop reads beyond the allocated canvas buffer, potentially exposing adjacent heap memory contents. An attacker with the ability to observe the output or error output may be able to extract sensitive data from the process heap (GitHub Commit, GitHub Advisory).

Indicators of compromise

  • Process: ImageMagick (convert, magick) processes invoked with both -size and -extract options where extract dimensions exceed size dimensions; unexpected crashes or memory errors in ImageMagick processes.
  • Logs: Application logs showing ImageMagick processing raw format files (.bgr, .cmyk, .gray, .raw, .rgb, .ycbcr) with mismatched dimension parameters; error messages referencing out-of-bounds memory access or segmentation faults in image coders.
  • File System: Presence of unusually crafted raw image files with mismatched -size and -extract metadata in upload directories or temporary processing folders.

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). Magick.NET users should upgrade to version 14.10.3 or later. As a workaround, restrict local access to systems running ImageMagick and implement input validation to reject raw image files with mismatched -extract and -size dimensions before processing. Linux distribution users should apply vendor-provided security updates (available for Debian, SUSE, Ubuntu, Amazon Linux 2, and openSUSE) (GitHub Advisory, Magick.NET Release).

Community reactions

Red Hat tracked the vulnerability via Bugzilla (Bug 2442093) and assigned it medium severity, with downstream packages under review. Multiple Linux distributions including Debian, SUSE, openSUSE, Ubuntu, and Amazon Linux 2 issued security advisories and package updates following the disclosure. No notable independent researcher commentary or significant social media discussion has been identified beyond standard vulnerability database and distribution advisory coverage (Red Hat Bugzilla).

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+deb12u7

Fixed

sid

imagemagick: 8:7.1.2.15+dfsg1-1

Fixed

trixie

imagemagick: 8:7.1.1.43+dfsg1-1+deb13u6

Fixed

Ubuntu

Fixed

bionic (esm-infra)

imagemagick: 8:6.9.7.4+dfsg-16ubuntu6.15+esm12

Fixed

devel

imagemagick

Not Affected

focal (esm-apps)

imagemagick: 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm10

Fixed

jammy

imagemagick

Affected

jammy (esm-apps)

imagemagick: 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm10

Fixed

noble

imagemagick

Affected

noble (esm-apps)

imagemagick: 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm9

Fixed

questing

imagemagick: 8:7.1.2.3+dfsg1-1ubuntu0.1

Fixed

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