Cloudanix VulnDB

CVE-2026-33908

High · 7.5

CVSS

7.5

EPSS

0.7%

Published

Apr 13, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A malicious file can crash image-processing software and disrupt services that handle uploaded or converted media.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

CVE-2026-33908 is an unauthenticated denial-of-service flaw in ImageMagick caused by unbounded recursive cleanup of XML tree structures in DestroyXMLTree(). When ImageMagick processes a specially crafted XML-based image or document with extreme nesting depth, the recursive free operation can exhaust process stack memory and crash the ImageMagick process. The impact is loss of availability for services that invoke ImageMagick to inspect, convert, resize, thumbnail, or otherwise process untrusted files. It does not provide code execution, data disclosure, or data modification based on the published description.

Why it matters to the business

Applications that accept or process user-supplied images, documents, or XML-based formats through ImageMagick can be forced to fail repeatedly by a malicious file, disrupting uploads, thumbnail generation, media conversion pipelines, content moderation workflows, or other image-processing jobs. The EPSS score is currently low and there is no known KEV listing or reported ransomware use, but ImageMagick is widely embedded in web applications, content platforms, CI pipelines, and backend media services, so organizations should still patch exposed processing paths to prevent easy service disruption.

How an attack unfolds

An attacker identifies an application, API, queue, or batch-processing workflow that passes attacker-controlled files to ImageMagick. The attacker submits a crafted XML file or XML-based image/document containing deeply nested structures. ImageMagick parses the input and later frees the XML tree using DestroyXMLTree(), which recurses without enforcing a safe maximum depth. The deeply nested tree causes stack exhaustion, leading to a crash or abnormal termination of the ImageMagick process. If the surrounding service automatically retries the same file, processes many concurrent malicious files, or lacks worker isolation and rate limiting, the attacker can amplify the issue into sustained application-level denial of service.

How to fix it

Upgrade ImageMagick to a fixed release: ImageMagick 7.x should be upgraded to 7.1.2-19 or later, and ImageMagick 6.x should be upgraded to 6.9.13-44 or later. Because ImageMagick is often bundled through operating-system packages, containers, language libraries, or application images, update all runtime locations, not only developer workstations. Rebuild and redeploy containers or server images that include vulnerable ImageMagick binaries. If immediate upgrading is not possible, reduce exposure by rejecting or sanitizing XML and XML-based image formats from untrusted sources, applying strict file size and nesting/complexity limits before invoking ImageMagick, running ImageMagick in isolated low-privilege workers, enforcing CPU/memory/time limits, disabling unnecessary coders through ImageMagick policy.xml, and preventing automatic infinite retries of failed processing jobs.

How to confirm the fix worked

Confirm the installed ImageMagick version with commands such as `magick -version`, `convert -version`, or package-manager inventory, and verify that 7.x deployments are at 7.1.2-19 or later and 6.x deployments are at 6.9.13-44 or later. Check container images, build artifacts, background workers, web servers, and any third-party applications that ship their own ImageMagick binary. Validate that file-processing services reject or safely handle malformed deeply nested XML inputs without crashing workers. Review ImageMagick policy.xml to ensure unnecessary XML-capable or high-risk coders are disabled where business functionality does not require them. Confirm operational mitigations such as per-job timeouts, memory limits, worker isolation, upload rate limits, and retry caps are active.

Typical attack path

  1. Find a public or reachable feature that accepts files and uses ImageMagick for conversion, thumbnailing, metadata extraction, or validation.
  2. Create an XML or XML-based file with extremely deep nested elements designed to trigger excessive recursion during XML tree destruction.
  3. Upload or submit the file through the vulnerable application, API, message queue, or processing pipeline.
  4. ImageMagick processes the file and calls DestroyXMLTree() during cleanup.
  5. The recursive cleanup exhausts stack memory and crashes the ImageMagick process or worker handling the job.
  6. Repeat submissions or rely on automatic retries to cause repeated worker crashes, processing backlogs, failed uploads, or service degradation.

How to detect it

This vulnerability produces denial-of-service symptoms rather than durable compromise artifacts. To assess possible prior exploitation, review web/API upload logs, object-storage access logs, job queue records, worker logs, process supervisor logs, container orchestration events, kernel logs, and crash dumps for ImageMagick crashes immediately after processing XML or XML-based files. Look for repeated failures tied to the same source IP, user account, upload endpoint, file hash, queue message, or filename pattern. In Linux environments, search syslog, journald, dmesg, container logs, and core dump metadata for ImageMagick processes such as `magick`, `convert`, `identify`, or application workers terminating with stack overflow, segmentation fault, SIGSEGV, SIGABRT, or out-of-memory-like symptoms while handling XML input. In application telemetry, investigate bursts of HTTP 5xx responses, failed thumbnail/conversion jobs, worker restarts, queue backlogs, or retry loops correlated with uploads of XML, SVG, MVG, MSL, or other XML-like content. Because there are no public reports of active exploitation or named threat actors for this issue, detection should focus on crash correlation and malformed input artifacts rather than known attacker infrastructure.

  • DestroyXMLTree
  • stack overflow
  • Segmentation fault
  • SIGSEGV
  • SIGABRT
  • core dumped
  • magick:
  • convert:
  • identify:
  • coders/xml
  • xml-tree.c
  • worker exited unexpectedly
  • CrashLoopBackOff
  • deeply nested XML
  • nested XML
  • failed to process XML
  • failed to process SVG

What your security team should do

  • Inventory all applications, containers, batch jobs, and third-party products that invoke ImageMagick, including indirect use through media-processing libraries or plugins.
  • Prioritize patching internet-facing upload, conversion, thumbnailing, and document-processing services to ImageMagick 7.1.2-19 or later, or 6.9.13-44 or later.
  • Rebuild and redeploy container images or immutable server images that include ImageMagick rather than only patching base hosts.
  • Temporarily block or restrict XML and XML-derived formats from untrusted users where they are not required.
  • Apply sandboxing, least privilege, memory limits, execution timeouts, and queue retry limits to ImageMagick workers to reduce blast radius from malformed files.
  • Monitor for repeated ImageMagick crashes, segmentation faults, worker restarts, and spikes in failed file-processing jobs, especially after uploads of XML-based files.
  • Add regression tests using malformed deeply nested XML samples to ensure updated versions and runtime limits prevent worker crashes.

The record

ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below both 7.1.2-19 and 6.9.13-44, Magick frees the memory of the XML tree via the `DestroyXMLTree()` function; however, this process is executed recursively with no depth limit imposed. When Magick processes an XML file with deeply nested structures, it will exhaust the stack memory, resulting in a Denial of Service (DoS) attack. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19.

Affected packages

Ecosystem Package Introduced Fixed
openSUSE:Leap 16.0 ImageMagick 0 7.1.2.0-160000.8.1
openSUSE:Tumbleweed ImageMagick 0 7.1.2.19-2.1

Related vulnerabilities