Skip to main content
Vulnerability Database/CVE-2026-109264

CVE-2026-109264: ImageMagick MVG Decoder DOS Vulnerability

CVE-2026-109264 is a denial of service vulnerability in ImageMagick caused by uncontrolled recursion in the MVG decoder that exhausts the program stack. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-109264 Overview

CVE-2026-109264 is an uncontrolled recursion vulnerability [CWE-674] in the ImageMagick Magick Vector Graphics (MVG) decoder. The flaw affects ImageMagick versions before 6.9.13-57 and 7.x releases before 7.1.2-32. An attacker who controls a file name processed by ImageMagick can trigger recursive coder invocations that exhaust the process stack. The resulting stack overflow crashes the ImageMagick process, producing a denial of service condition. Because many web applications pass user-supplied file names into ImageMagick for thumbnailing and conversion, the attack vector is remote and requires no authentication.

Critical Impact

Remote attackers can crash ImageMagick-backed image processing services through a crafted file name that triggers unbounded recursion in the MVG decoder.

Affected Products

  • ImageMagick 6.x before 6.9.13-57
  • ImageMagick 7.x before 7.1.2-32
  • Applications and services that invoke ImageMagick on untrusted file names (web upload handlers, image conversion pipelines, document processors)

Discovery Timeline

  • 2026-10-12 - CVE-2026-109264 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-109264

Vulnerability Analysis

The vulnerability resides in ImageMagick's image coder dispatch logic, specifically where the MVG decoder reads nested image references. MVG is a text-based drawing format that can embed image directives referencing other image files. When ImageMagick processes an MVG file that references additional images, each reference re-enters the coder subsystem via ReadImage. Prior to the patch, this re-entry path had no recursion depth limit. An attacker who controls the file name or an embedded image directive can craft input that recurses indefinitely until the thread stack is exhausted, terminating the process with a segmentation fault.

Root Cause

The root cause is the absence of a recursion counter in the coder entry point in MagickCore/constitute.c (and the equivalent magick/constitute.c in the 6.x branch). The MVG and SVG decoders also reused image info structures incorrectly, which allowed the recursion state to propagate across nested calls without tracking depth.

Attack Vector

Exploitation requires that a victim application pass attacker-influenced data (a file name, MVG content, or an SVG that chains to MVG) to ImageMagick. No authentication or user interaction is required when the vulnerable workflow is reachable from an upload endpoint. The impact is limited to availability; the vulnerability does not provide code execution or data disclosure.

c
// Patch excerpt - MagickCore/constitute.c (ImageMagick 7.x)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
       image_info->filename);
   assert(exception != (ExceptionInfo *) NULL);
+  if (((ImageInfo *) image_info)->coder_depth++ >= MagickMaxRecursionDepth)
+    {
+      (void) ThrowMagickException(exception,GetMagickModule(),CoderError,
+        "ImageRecursionDepthExceeded","`%s'",image_info->filename);
+      return((Image *) NULL);
+    }
   read_info=CloneImageInfo(image_info);
   (void) CopyMagickString(magick_filename,read_info->filename,MagickPathExtent);
   (void) SetImageInfo(read_info,0,exception);

Source: GitHub ImageMagick Commit 6ff963c

The patch introduces a coder_depth counter guarded by MagickMaxRecursionDepth. When nested coder invocations exceed the ceiling, ImageMagick raises ImageRecursionDepthExceeded and returns rather than recursing further. A companion change in MagickCore/draw.c replaces an uninitialized AcquireImageInfo() call with CloneImageInfo(draw_info->image_info) so that the recursion counter inherits across nested MVG draws.

Detection Methods for CVE-2026-109264

Indicators of Compromise

  • Repeated ImageMagick process crashes with SIGSEGV on hosts handling user-uploaded images
  • Log entries containing ImageRecursionDepthExceeded after patch deployment, indicating hostile input
  • Uploads with MVG or SVG payloads containing nested image directives referencing further MVG or SVG resources
  • Elevated worker-process restart rates in image processing microservices

Detection Strategies

  • Inspect web upload handlers for MVG, SVG, or files whose filename contains an mvg: or svg: prefix passed to ImageMagick CLI tools (convert, magick, identify)
  • Monitor system crash reporters (abrt, systemd-coredump, Windows Error Reporting) for stack-overflow terminations in magick, convert, or any linker to libMagickCore
  • Correlate HTTP 5xx spikes from image processing endpoints with child-process termination events

Monitoring Recommendations

  • Enable ImageMagick event logging (-debug coder,exception) in staging to observe recursion patterns
  • Alert on process exits with exit codes consistent with stack exhaustion in image-handling services
  • Track outbound requests originating from ImageMagick worker processes to detect embedded remote image references

How to Mitigate CVE-2026-109264

Immediate Actions Required

  • Upgrade ImageMagick to 6.9.13-57 or later on the 6.x branch, or 7.1.2-32 or later on the 7.x branch
  • Disable the MVG and SVG coders in policy.xml on systems that do not require vector rendering
  • Restrict ImageMagick worker processes with resource limits (ulimit -s, cgroups) so stack exhaustion isolates to a single worker
  • Validate and normalize user-supplied file names before passing them to ImageMagick to block coder-prefix injection (for example, mvg:/tmp/evil)

Patch Information

The upstream fix lands in commit 6ff963c14ccb5fefb4eb8654c8b0219033df2b20 for ImageMagick 7.x and commit d4f06dcca7ad99d639af85bc347ad9fdfdcec8e2 for ImageMagick 6.x. Both commits add a coder_depth recursion guard in constitute.c and correct image-info propagation in the drawing subsystem. Reference the GitHub Security Advisory GHSA-pmqj-84pr-qc7c and the VulnCheck ImageMagick Advisory for distribution-specific backports.

Workarounds

  • Add <policy domain="coder" rights="none" pattern="MVG" /> and the equivalent SVG entry to /etc/ImageMagick-7/policy.xml
  • Deny file names that embed coder prefixes by stripping colons from untrusted input before invoking ImageMagick
  • Sandbox the ImageMagick process with seccomp, AppArmor, or container-level restrictions to limit blast radius of a crash
  • Front image upload endpoints with a reverse-proxy rate limiter to blunt repeated crash attempts
bash
# /etc/ImageMagick-7/policy.xml - disable vector coders implicated in CVE-2026-109264
<policymap>
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="SVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
  <policy domain="resource" name="memory" value="256MiB"/>
  <policy domain="resource" name="map" value="512MiB"/>
</policymap>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.