Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain write access to privileged policy.xml
-
ExploitSupply alternate DOCTYPE not ending in ']>'
-
ExecutionParser skips all policy rules (fail-open)
-
ImpactRestricted coders/delegates silently re-enabled
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Protection mechanism completeness
|
| Exploitation Conditions | Exploitation requires that ImageMagick's security policy file (policy.xml) contain a DOCTYPE declaration whose syntax does not end in ']>' - the exact condition that causes LoadPolicyCache to consume the rest of the file and apply no rules. This presupposes (1) a deployment that actually relies on policy.xml for hardening, and (2) an actor able to write or influence that privileged configuration file, or an administrator who inadvertently authors such a DOCTYPE. Limiting factors: the bug is local/config-only (not remotely reachable), requires high privileges over the config, and has no effect on default installs that ship no restrictive policy.xml; it does not directly grant code execution but silently disables intended restrictions. |
| Impact | This is a genuinely low-priority issue, and the signals largely agree. The vendor CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:H) yields a 1.8 score, reflecting that exploitation requires local access, high privileges, a present attack requirement, and high complexity - all consistent with a flaw in how the policy.xml hardening file is parsed. There is no EPSS score provided, no CISA KEV listing, and no public POC, so no signal points to active or imminent exploitation. The real-world concern is not a remote attacker gaining access but a fail-open security control: an administrator who deploys a policy.xml using an alternate DOCTYPE (one not ending in ']>') will have ALL policy rules silently skipped, re-enabling restricted coders/operations (e.g., the MVG/MSL/HTTPS delegates historically abused in ImageMagick exploits) without any error. The practical risk is therefore indirect - it weakens a defensive mitigation rather than directly granting attacker capability, which is why CVSS is correctly low. The main caveat: the low CVSS assumes an attacker must author the malicious policy.xml (PR:H), but the more realistic danger is an administrator unknowingly triggering the fail-open via a legitimate-looking DOCTYPE, which the base score does not capture. |
| Exploit ScenarioDerived | An administrator hardens ImageMagick by writing a policy.xml that forbids dangerous coders and delegates, but uses a DOCTYPE declaration that does not terminate with ']>'. On load, LoadPolicyCache consumes the remainder of the file and applies zero rules, so the intended restrictions never take effect; a subsequent untrusted image or MSL/MVG payload can then invoke operations the policy was supposed to block. No public exploit code is identified, and triggering it requires control over or an error in the privileged policy configuration file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 03, 2026
ImageMagick 7.x before 7.1.2-32 and 6.x before 6.9.13-57 silently discard the entire contents of a deployment's security policy when policy.xml carries a DOCTYPE declaration whose syntax does not end in ']>', so every restriction the administrator intended (e.g. blocking coders, delegates, or resource-heavy formats) is ignored and the previously forbidden operations succeed. Exploitation is local and privileged: the CVSS 4.0 vector scores it 1.8 (AV:L/AC:H/AT:P/PR:H/UI:N), meaning an actor with high privileges who can write or influence the privileged policy.xml file - or an administrator who authors a non-conforming DOCTYPE by accident - is the trigger, and the bug has no effect on default installations that ship no restrictive policy. There is no public exploit identified at time of analysis and the flaw is not in CISA KEV; vendor patches are available in 7.1.2-32 and 6.9.13-57, so this is assessed as a genuinely low-priority hardening issue rather than an urgent remote threat.
RemediationAI
Vendor-released patch: update to ImageMagick 7.1.2-32 or 6.9.13-57 (or any later release on the respective branch); the fixes are the commits 1926ccf119141c26274c120d1899dffae19b0c71 and 399d4bd3b081f44c7fef78153f65e8cdebed9f1a for the 7.x tree and da6022b2efe6cce8a2fd8f9e51188a45a3b9d558 and 402ebc5353e569234908962cbdf451531ff66a57 for the 6.x tree, and the advisory is at https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-jjp4-3fwf-393j. If upgrading immediately is not possible, the actionable compensating controls are: inspect the deployed policy file (commonly /etc/ImageMagick-7/policy.xml or /etc/ImageMagick-6/policy.xml) and either remove the DOCTYPE declaration entirely or rewrite it so it terminates with the literal ']>' sequence the vulnerable parser expects - this avoids the trigger but leaves the parser bug in place, so any later edit that reintroduces a non-conforming DOCTYPE reopens the bypass; tighten filesystem permissions on policy.xml and its parent directory so only root or the packaging system can write it, which removes the privileged-write prerequisite but does not protect against an administrator authoring a bad DOCTYPE by accident; and verify the effective policy after any change with 'identify -list policy' or 'magick -list policy', since the failure mode is a silently empty policy list rather than an error. Restricting who can invoke ImageMagick or its delegates reduces the value of a bypassed policy but does not restore the intended restrictions, and none of these workarounds should be treated as a substitute for applying the 7.1.2-32 or 6.9.13-57 update.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The defect is a protection-mechanism failure (CWE-693) inside LoadPolicyCache, the routine in MagickCore/policy.c (magick/policy.c in the 6.x branch) that parses policy.xml at component startup. Before the fix, the code skipped the DOCTYPE declaration with a loop that advanced token-by-token until it found the literal two-character sequence ']>' or hit the end of the string - a substring test rather than real XML tokenization. Any syntactically valid DOCTYPE that does not happen to contain ']>' (for example one closed simply with '>', or using an external SYSTEM/PUBLIC identifier instead of an internal subset) causes that loop to run to the end of the file, after which no PolicyInfo entries are populated and the policy cache is effectively empty, so operations that policy.xml was meant to deny become permitted. The two upstream commits replace this with a proper scanner that tracks single-quoted and double-quoted sections, maintains a subset_depth counter across nested '[' and ']' characters, terminates only on a '>' at depth zero, and - if the buffer is exhausted - throws a ConfigureError 'UnterminatedDOCTYPE' and destroys the linked list instead of silently continuing. The affected CPE is the generic cpe:2.3:a:imagemagick:imagemagick:* entry, reflecting that both the 7.x and 6.x release trains share the same parsing logic and needed independent patches.
Know when Imagemagick gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:H/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Local, config-only flaw needing write access to the privileged policy.xml (PR:H) and a specific malformed DOCTYPE (AC:H); it weakens protections with limited direct C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
More in Imagemagick
View allThe (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.
The (1) HTTP and (2) FTP coders in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allow remote attackers to conduct
The EPHEMERAL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to delete arbitrary fi
ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the palette uninitialized when proc
Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote attackers to cause a denial of serv
The LABEL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to read arbitrary files vi
The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbit
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
The ReadDCMImage function in DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer
Heap buffer overflow in ImageMagick's XBM image decoder (ReadXBMImage) lets remote attackers write attacker-controlled d
EUVD-2026-91870
GHSA-9r9r-c7x8-qp3r
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB