CVE-2026-25898
C# vulnerability analysis and mitigation

Overview

CVE-2026-25898 is a global buffer over-read (out-of-bounds read) vulnerability in ImageMagick's UIL and XPM image encoders, caused by failure to validate pixel index values before using them as array subscripts. It affects 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 NuGet packages prior to version 14.10.3. The vulnerability was published on February 23–24, 2026, with patches released simultaneously. The GitHub Security Advisory assigns a CVSS v3.1 score of 6.5 (Moderate), while Feedly's aggregated data notes a higher score of 9.1 (Critical) from some sources — the authoritative GitHub advisory score of 6.5 is used here (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is CWE-125 (Out-of-bounds Read): the WriteUILImage function in coders/uil.c (line 355) and WriteXPMImage in coders/xpm.c (line 1135) use the return value of GetPixelIndex() directly as an array subscript without bounds validation. In HDRI (High Dynamic Range Image) builds, the Quantum type is a floating-point value, which means pixel index values can be negative; a crafted image with such negative indices causes the encoder to read memory before the start of the intended buffer. The attack requires no authentication or user interaction beyond submitting a malicious UIL or XPM image for processing, making it exploitable remotely with low complexity (GitHub Advisory, Github Advisory).

Impact

Successful exploitation can result in information disclosure — reading sensitive data from process memory — or a process crash (denial of service). The vulnerability does not affect data integrity. Systems that automatically process user-supplied images (e.g., web applications, media pipelines) are at elevated risk, as an attacker can trigger the flaw by submitting a crafted UIL or XPM file without any credentials or user interaction (GitHub Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Identify target: Locate a service or application that processes UIL or XPM image files using a vulnerable ImageMagick version (prior to 7.1.2-15 or 6.9.13-40) built with HDRI support (where Quantum is a floating-point type).
  2. Craft malicious image: Create a UIL or XPM image file containing pixel index values that are negative (e.g., by manipulating the colormap index fields in the image header/data to produce values that, when interpreted as a floating-point Quantum, are negative).
  3. Submit image for processing: Upload or send the crafted image to the target application — for example, via a file upload endpoint, an image conversion API, or any pipeline that invokes ImageMagick's convert or similar commands on untrusted input.
  4. Trigger OOB read: When ImageMagick's UIL or XPM encoder processes the image, GetPixelIndex() returns a negative value that is used as an array subscript, causing a read before the start of the colormap buffer.
  5. Achieve objective: Depending on memory layout and application behavior, the attacker may obtain leaked memory contents (information disclosure) or cause the ImageMagick process to crash (denial of service) (GitHub Advisory).

Indicators of compromise

  • Process: ImageMagick processes (convert, magick, or application workers) crashing unexpectedly or producing AddressSanitizer-style error output referencing coders/uil.c:355 or coders/xpm.c:1135.
  • Logs: Application error logs showing segmentation faults or abnormal termination during UIL or XPM image conversion; stack traces mentioning WriteUILImage or WriteXPMImage.
  • File System: Presence of unusual .uil or .xpm files in upload directories or temporary processing folders with anomalous colormap index values.
  • Network: Repeated submission of UIL or XPM format images from a single source IP to an image processing endpoint, particularly if followed by application crashes or error responses (GitHub Advisory).

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 prior to patching, restrict or disable processing of UIL and XPM format image files from untrusted sources using ImageMagick's policy configuration (/etc/ImageMagick-*/policy.xml) by denying the UIL and XPM coders. Linux distribution packages (Ubuntu USN-8069-1, Debian DSA-6158/6159/DLA-4497, SUSE, openSUSE, Amazon Linux 2 ALAS2-2026-3211) have also released updated packages (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 (Bug 2442102) with medium priority and severity. Multiple Linux distributions (Ubuntu, Debian, SUSE, openSUSE, Amazon Linux) issued security advisories and updated packages within days of disclosure, reflecting standard coordinated response for a moderate-severity library vulnerability. No notable social media controversy or significant researcher commentary beyond the advisory itself 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