
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-30937 is a heap buffer overflow vulnerability in ImageMagick's XWD (X Windows) encoder caused by a 32-bit unsigned integer overflow in the bytes_per_line calculation within the WriteXWDImage function. It affects ImageMagick versions prior to 7.1.2-16 (7.x branch) and prior to 6.9.13-41 (6.x branch), as well as Magick.NET NuGet packages prior to version 14.10.4. The vulnerability was published on March 9, 2026, by researcher ylwango613 via the ImageMagick GitHub Security Advisory. It carries a CVSS v3.1 base score of 6.8 (Moderate) per the GitHub Advisory, or 6.1 (Medium) per Red Hat's scoring (GitHub Advisory, Red Hat CVE).
The root cause is a 32-bit unsigned integer (CARD32) overflow in the XWD encoder's bytes_per_line calculation (CWE-190: Integer Overflow or Wraparound), which results in an undersized heap buffer allocation (CWE-122: Heap-based Buffer Overflow). When an extremely large image is processed for XWD output, the arithmetic overflow causes the allocated buffer to be smaller than required, and subsequent write operations exceed the buffer boundary — confirmed by AddressSanitizer output showing a WRITE of size 1 beyond the heap allocation. Exploitation requires local access and the ability to submit an extremely large image for processing through the XWD encoder; no special privileges are required per the GitHub advisory's CVSS scoring (GitHub Advisory, Red Hat Bugzilla).
Successful exploitation can cause a denial of service (DoS) by crashing the ImageMagick process, and may also result in limited data integrity impact through out-of-bounds heap writes. Confidentiality is not affected, as the vulnerability does not expose sensitive data. The scope is limited to the affected process and does not enable lateral movement or privilege escalation based on current analysis (GitHub Advisory, Red Hat CVE).
bytes_per_line calculation (width × bytes_per_pixel) overflows a 32-bit unsigned integer (CARD32), causing the computed value to wrap around to a small number.convert <large_image> output.xwd, causing the WriteXWDImage function to allocate an undersized heap buffer based on the overflowed bytes_per_line value.convert, magick, or any ImageMagick-linked process when processing XWD output; AddressSanitizer reports showing heap-buffer-overflow in WriteXWDImage.Upgrade ImageMagick to version 7.1.2-16 or later (7.x branch) or 6.9.13-41 or later (6.x branch); Magick.NET users should upgrade to version 14.10.4 or later. No configuration-based workaround is documented; the primary remediation is patching. As an interim measure, restrict local access to systems running vulnerable ImageMagick versions and limit which users or processes can submit image files for XWD encoding (GitHub Advisory, Red Hat CVE). Distribution-specific updates have been issued for Debian, SUSE/openSUSE, and Amazon Linux 2.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."