CVE-2026-105083 in ImageMagickinfo

Summary

by MITRE • 10/03/2026

ImageMagick before 7.1.2-32 and 6.9.13-57 contains a policy bypass vulnerability in LoadPolicyCache that silently skips security policy rules when policy.xml uses an alternate DOCTYPE. A valid DOCTYPE not ending in ']>' makes the parser consume the rest of the file, so no policy rules are applied and restricted operations become allowed.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 10/03/2026

ImageMagick is a widely used open-source software suite for creating, editing, composing, or converting bitmap images. It supports over 200 major image formats and is integrated into numerous web applications, content management systems, and enterprise workflows. The vulnerability identified in versions prior to 7.1.2-32 and 6.9.13-57 resides within the policy loading mechanism, specifically affecting how security policies defined in configuration files are parsed and enforced by the application engine. This flaw allows attackers to bypass critical security restrictions that are intended to prevent denial of service attacks, arbitrary code execution, or unauthorized access to system resources through maliciously crafted image inputs.

The core technical issue lies in the implementation of the LoadPolicyCache function within ImageMagick's configuration parser. Security policies for ImageMagick are typically defined in a file named policy.xml using XML syntax. These policies restrict specific operations such as reading certain formats, allocating memory limits, or executing external programs like Ghostscript when processing images. The vulnerability arises because the XML parser fails to correctly validate the Document Type Definition (DOCTYPE) declaration at the beginning of the configuration file. Specifically, if a valid DOCTYPE is present but does not end with the standard closing sequence ']>>', the parser behaves unexpectedly. Instead of halting or raising an error due to malformed syntax, it continues consuming the remainder of the file as part of the entity expansion or internal subset processing.

This parsing anomaly results in the complete silencing of security policy rules. Because the parser consumes the rest of the configuration file without properly interpreting the subsequent XML elements that define restrictions, no policies are loaded into memory during initialization. Consequently, ImageMagick operates with a null set of security constraints. This effectively disables protections against resource exhaustion attacks, such as those involving bomb images designed to consume excessive CPU or memory resources upon processing. It also removes barriers preventing the execution of dangerous external commands if they were previously restricted by policy rules governing delegate programs.

The operational impact of this vulnerability is significant for any system relying on ImageMagick to process untrusted image uploads. Attackers can exploit this bypass by ensuring that a maliciously crafted DOCTYPE declaration precedes their payload or simply by manipulating the configuration file structure in environments where they have write access, though more commonly it affects systems where default configurations might be altered or where specific parsing edge cases are triggered during automated processing pipelines. Without enforced policies, an attacker can trigger denial of service conditions that degrade system performance or cause crashes, potentially leading to availability loss for dependent services. In scenarios involving image-to-format conversions that invoke external tools, the lack of policy enforcement could allow arbitrary command execution if combined with other vulnerabilities in delegate handling.

This vulnerability aligns with CWE-20 Improper Input Validation and CWE-755: Improper Handling of Unexpected, Unusual or Excessive Input. The failure to strictly validate the DOCTYPE structure allows an attacker to manipulate the parsing state, leading to a security policy bypass which is categorized under CWE-862 Missing Authorization. From a threat intelligence perspective, this behavior can be mapped to MITRE ATT&CK techniques related to Defense Evasion, specifically how adversaries might exploit software misconfigurations or logic flaws to disable protective mechanisms. The silent nature of the failure makes detection difficult without explicit logging and monitoring of policy loading states.

Mitigation strategies primarily involve upgrading ImageMagick to version 7.1.2-32 or later for the v7 branch, or version 6.9.13-57 or later for the legacy v6 branch, where these parsing logic errors have been corrected to enforce strict DOCTYPE validation and ensure that policy files are parsed correctly regardless of minor syntactic variations in the declaration line. For organizations unable to immediately upgrade, implementing a Web Application Firewall (WAF) rule set capable of detecting anomalous XML structures or restricting image upload capabilities until patching is feasible can provide temporary relief. Additionally, administrators should audit their ImageMagick configurations to ensure that policy.xml files are not subject to modification by untrusted users and consider applying restrictive default policies even if the parser bug were present, although this is less reliable than fixing the underlying code defect. Regular security assessments of image processing pipelines are recommended to identify other potential vectors for abuse stemming from similar parsing inconsistencies in third-party libraries.

Responsible

VulnCheck

Reservation

10/03/2026

Disclosure

10/03/2026

Moderation

accepted

EPSS

0.00117

KEV

no

Activities

low

Sources

Do you know our Splunk app?

Download it now for free!