CVE-2026-25986
C# vulnerability analysis and mitigation

Overview

CVE-2026-25986 is a heap buffer overflow write vulnerability in ImageMagick's ReadYUVImage() function (coders/yuv.c) triggered when processing maliciously crafted YUV 4:2:2 (NoInterlace) images. The pixel-pair loop writes one pixel beyond the allocated row buffer, causing an out-of-bounds memory write. It affects ImageMagick versions prior to 7.1.2-15 (in the 7.x branch starting from 7.0.0-0) and prior to 6.9.13-40 (in the 6.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 GitHub Security Advisory assigns a CVSS v3.1 score of 5.3 (Moderate), while the NVD entry carries a score of 9.8 (Critical) — the discrepancy reflects differing assessments of confidentiality and integrity impact (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is an off-by-one out-of-bounds write (CWE-787, CWE-805) in the YUV decoder within coders/yuv.c. When processing YUV 4:2:2 NoInterlace images, the pixel-pair processing loop iterates one step beyond the end of the allocated row buffer, writing 8 bytes past the heap allocation boundary. An AddressSanitizer report confirms a WRITE of size 8 at an address beyond the allocated buffer (heap-buffer-overflow on address 0x5170000002e0). The attack vector is network-based and requires no authentication or user interaction — an attacker simply needs to supply a malicious YUV image to any application that passes user-controlled input to ImageMagick's YUV decoder (GitHub Advisory, Github Advisory).

Impact

The primary confirmed impact is denial of service through application crash caused by heap memory corruption. Depending on heap layout and exploitation sophistication, the out-of-bounds write could theoretically be leveraged for arbitrary code execution, which is reflected in the NVD's CVSS score of 9.8 with HIGH confidentiality, integrity, and availability impacts. Any application or service that processes user-supplied images via ImageMagick — including web applications, media pipelines, and document converters — is at risk of being crashed or potentially compromised by a remote, unauthenticated attacker (GitHub Advisory, Red Hat Bugzilla).

Exploitability

As of the time of reporting, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.027% (8th percentile), indicating a low near-term probability of exploitation. The vulnerability was reported by researcher ylwango613 and disclosed responsibly through GitHub's security advisory process (GitHub Advisory).

Exploitation steps

  1. Craft a malicious YUV image: Create a specially crafted YUV 4:2:2 (NoInterlace) image file with dimensions or pixel data designed to trigger the off-by-one condition in the ReadYUVImage() pixel-pair loop in coders/yuv.c.
  2. Identify a target: Locate a web application, API endpoint, or service that accepts image uploads or URLs and processes them using a vulnerable version of ImageMagick (prior to 7.1.2-15 or 6.9.13-40).
  3. Submit the malicious image: Upload or submit the crafted YUV file to the target application, causing ImageMagick to invoke ReadYUVImage() on the attacker-controlled input.
  4. Trigger the overflow: The pixel-pair loop writes one pixel (8 bytes) beyond the allocated row buffer, corrupting adjacent heap memory.
  5. Achieve denial of service (or potentially RCE): The heap corruption causes an application crash (denial of service). With advanced heap grooming techniques, an attacker may attempt to control the overwritten memory to redirect execution flow, though no public exploit demonstrating RCE exists at this time (GitHub Advisory).

Indicators of compromise

  • Logs: Application logs showing unexpected crashes or segmentation faults in ImageMagick processes; error messages referencing coders/yuv.c or ReadYUVImage(); AddressSanitizer output indicating heap-buffer-overflow if ASan is enabled.
  • File System: Presence of unusual .yuv image files in upload directories or temporary processing folders, particularly with anomalous dimensions or file sizes.
  • Process: Unexpected termination of ImageMagick worker processes (convert, magick, or application-embedded ImageMagick calls) when processing image files; core dump files generated in the working directory of the ImageMagick process.
  • Network: Repeated submission of YUV-format image files from a single source IP to an image-processing endpoint, especially if followed by service unavailability.

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 NuGet users, upgrade to version 14.10.3 or later. As a workaround where patching is not immediately possible, restrict or disable processing of YUV image format inputs (e.g., via ImageMagick's policy.xml to deny the YUV coder), and limit network access to services that process user-supplied images. Linux distribution packages (Ubuntu USN-8069-1, Debian DSA-6158/6159/DLA-4497, openSUSE, SUSE, Amazon Linux 2 ALAS2-2026-3211) have also released updated packages (GitHub Advisory, Red Hat Bugzilla, Ubuntu Advisory).

Community reactions

The vulnerability was disclosed by researcher ylwango613 through GitHub's coordinated disclosure process and published by maintainer dlemstra on February 23, 2026. Red Hat tracked the issue as medium severity in their Bugzilla, characterizing it as a denial-of-service risk via malicious YUV image processing. Multiple Linux distributions — including Ubuntu, Debian, SUSE, openSUSE, and Amazon Linux — issued security advisories and updated packages within weeks of disclosure, reflecting standard industry response to a library vulnerability with broad ecosystem impact (GitHub Advisory, Red Hat Bugzilla, Ubuntu Advisory).

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

Fixed

devel

imagemagick: 8:7.1.2.13+dfsg1-1ubuntu1

Fixed

focal (esm-apps)

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

Fixed

jammy

imagemagick

Affected

jammy (esm-apps)

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

Fixed

noble

imagemagick

Affected

noble (esm-apps)

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

Fixed

resolute

imagemagick: 8:7.1.2.13+dfsg1-1ubuntu1

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

SourceThis report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48798HIGH7.1
  • C# logoC#
  • SSH.NET
NoYesAug 18, 2026
CVE-2026-54570MEDIUM6.9
  • C# logoC#
  • AngleSharp
NoYesAug 18, 2026
CVE-2026-73851MEDIUM6.1
  • C# logoC#
  • Microsoft.OpenApi.Kiota
NoYesAug 17, 2026
CVE-2026-48796MEDIUM5.3
  • C# logoC#
  • CefSharp.Common
NoYesAug 18, 2026
GHSA-cvhv-g4rq-3hmwLOW3.3
  • C# logoC#
  • Magick.NET-Q8-OpenMP-x64
NoYesSep 02, 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