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

CVE-2026-109263: ImageMagick YUV Encoder Memory Leak DoS

CVE-2026-109263 is a memory leak flaw in ImageMagick's YUV encoder that enables denial of service attacks through resource exhaustion. This post explains its technical details, affected versions, impact, and mitigation steps.

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-109263 Overview

CVE-2026-109263 is a memory leak vulnerability [CWE-401] in ImageMagick, a widely used image processing library. The flaw resides in the YUV encoder within coders/yuv.c, where allocated memory is not released when a specific encoder operation fails. Attackers can supply crafted input that triggers the failing operation, progressively leaking memory and exhausting resources on the host. Affected versions include ImageMagick before 6.9.13-57 and 7.x before 7.1.2-32.

Critical Impact

Repeated processing of attacker-supplied images can exhaust server memory, causing denial of service in applications and services that convert or encode images to the YUV format.

Affected Products

  • ImageMagick 6.x before 6.9.13-57
  • ImageMagick 7.x before 7.1.2-32
  • Applications and services embedding vulnerable ImageMagick versions for YUV encoding

Discovery Timeline

  • 2026-10-12 - CVE-2026-109263 published to the National Vulnerability Database (NVD)
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-109263

Vulnerability Analysis

The vulnerability resides in the YUV writer in coders/yuv.c. When ImageMagick encodes an image to the YUV colorspace, it first allocates a yuv_image buffer and then calls ResizeImage to produce a chroma_image. If the ResizeImage call fails and returns a null pointer, the original code aborted the write path without releasing the previously allocated yuv_image. Each failed encode operation leaks that allocation. An attacker able to submit many crafted images that force the chroma resize to fail can grow process memory until the system reaches resource limits, producing a denial of service condition against the hosting service. The flaw does not corrupt data or disclose information; its impact is restricted to availability.

Root Cause

The root cause is missing cleanup on a failure path, classified as [CWE-401] Missing Release of Memory after Effective Lifetime. The error handling branch invoked CloseBlob or ThrowWriterException without first calling DestroyImage on yuv_image. Proper resource ownership requires every successfully allocated image buffer to be destroyed on all exit paths.

Attack Vector

Exploitation requires only that an attacker supply crafted image input to a service that routes data through ImageMagick's YUV encoder. No authentication or user interaction is required in network-exposed scenarios such as image conversion APIs, upload pipelines, or thumbnail generators. Each failed encode attempt amplifies memory consumption until the process is terminated or the host becomes unresponsive.

c
// Patch in coders/yuv.c (ImageMagick 7.x)
       (size_t) ((ssize_t) height/vertical_factor),TriangleFilter,exception);
     if (chroma_image == (Image *) NULL)
       {
+        yuv_image=DestroyImage(yuv_image);
         (void) CloseBlob(image);
         return(MagickFalse);
       }
// Source: https://github.com/ImageMagick/ImageMagick/commit/493fab0b6072787e929184761b6ab6405a9486a2
c
// Patch in coders/yuv.c (ImageMagick 6.x)
     chroma_image=ResizeImage(image,width/horizontal_factor,
       height/vertical_factor,TriangleFilter,1.0,&image->exception);
     if (chroma_image == (Image *) NULL)
-      ThrowWriterException(ResourceLimitError,image->exception.reason);
+      {
+        yuv_image=DestroyImage(yuv_image);
+        ThrowWriterException(ResourceLimitError,image->exception.reason);
+      }
     (void) TransformImageColorspace(chroma_image,YCbCrColorspace);
// Source: https://github.com/ImageMagick/ImageMagick6/commit/3e2075fe4a148ce33e7d749a99898e55a6cad7b5

Detection Methods for CVE-2026-109263

Indicators of Compromise

  • Sustained growth in resident memory of processes invoking ImageMagick's convert, magick, or linked library calls targeting YUV output.
  • Repeated ResourceLimitError entries in ImageMagick or application logs referencing the YUV writer.
  • Clusters of inbound requests submitting images with unusual width or height values that force chroma resize failures.

Detection Strategies

  • Inventory hosts running ImageMagick and compare installed package versions against 6.9.13-57 and 7.1.2-32.
  • Instrument image-processing services with per-request memory accounting to flag conversions that leak allocations across invocations.
  • Alert on repeated writer exceptions in application logs when the target format is YUV.

Monitoring Recommendations

  • Monitor long-running image worker processes for monotonic memory growth that does not recover between jobs.
  • Collect and centralize ImageMagick stderr output to detect ResourceLimitError conditions originating in coders/yuv.c.
  • Track request-rate anomalies against image conversion endpoints that permit YUV output formats.

How to Mitigate CVE-2026-109263

Immediate Actions Required

  • Upgrade ImageMagick to version 6.9.13-57 or 7.1.2-32 or later across all systems.
  • Audit downstream applications and container images that bundle ImageMagick to confirm the patched version is deployed.
  • Restrict the output formats accepted by image conversion services, blocking YUV where it is not required.

Patch Information

The fix adds a yuv_image=DestroyImage(yuv_image) call on the failure branch, ensuring the buffer is released before the writer exits. Patch details are available in the ImageMagick 7.x commit and the ImageMagick 6.x commit. Additional context is published in GitHub Security Advisory GHSA-69jx-j2x2-g5w4 and the VulnCheck Advisory on Memory Leak.

Workarounds

  • Disable YUV as an allowed output coder using an ImageMagick policy.xml restriction until patching is complete.
  • Enforce per-process memory limits (for example, cgroups or ulimit) so leaking workers are terminated before affecting host availability.
  • Rate-limit image conversion endpoints and reject input dimensions that are not divisible by the configured chroma subsampling factors.
bash
# /etc/ImageMagick-7/policy.xml - block the YUV coder until patched
<policymap>
  <policy domain="coder" rights="none" pattern="YUV" />
</policymap>

# Verify the installed version
magick -version | head -n 1

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.