Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local write access to OpenCL cache directory
-
DeliveryCraft malformed XML with unclosed device elements
-
ExploitPlace file in ImageMagick cache path
-
ExecutionTrigger ImageMagick operation loading OpenCL profile
-
PersistMemory leak exhausts heap
-
ImpactImageMagick process crashes (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Resource cleanup, leak prevention
|
| Exploitation Conditions | Exploitation requires three concurrent conditions, all of which must be satisfied simultaneously. First, the attacker must have write access to the OpenCL cache directory used by ImageMagick - this is the definitive prerequisite and the primary barrier (reflected in PR:H and AT:P in the CVSS 4.0 vector). Second, ImageMagick must be built with OpenCL support enabled and the OpenCL subsystem must be active at runtime; environments built with --without-opencl are not affected. Third, attack complexity is rated High (AC:H), meaning the attacker must craft a specifically malformed XML file with unclosed device elements to trigger the unfreed allocation path. Exploitation is not possible remotely - only local filesystem access to the cache path enables the attack (AV:L). There is no authentication bypass or privilege escalation; the attacker must already possess write permissions to the target directory, which in practice means a pre-existing local foothold or insider access. |
| Impact | The CVSS 4.0 score of 1.8 is consistent with the attack profile and accurately reflects minimal real-world risk. The vector AV:L/AC:H/AT:P/PR:H encodes three hard prerequisites simultaneously: local access, high attack complexity, physical/local presence requirement, and high privilege level (write access to the OpenCL cache directory). EPSS data is not provided, but given the extremely constrained attack surface, real-world exploitation probability is low. There is no KEV listing and no POC code identified. The impact is strictly availability-limited (VA:L), with zero confidentiality or integrity consequence. This is a low-priority hardening item rather than an emergency response situation. The primary realistic concern is insider threat or a scenario where an attacker has already achieved local foothold with sufficient privilege - at which point this DoS is a far lesser concern than their existing access. CVSS 3.1 equivalent signals the same: AC:H/PR:H with A:L is a low-severity, locally-constrained issue. |
| Exploit ScenarioDerived | A local attacker who has gained write access to the OpenCL cache directory - perhaps through a misconfigured shared-hosting environment, a co-located container with a mounted cache volume, or a partially-compromised local account - places a crafted XML file containing malformed, unclosed OpenCL device elements. When ImageMagick subsequently performs any operation that loads the OpenCL benchmark profile, the memory leak is triggered; if the attacker can force repeated reloads (e.g., via a script that invokes ImageMagick in a loop), heap exhaustion causes the ImageMagick process or the hosting application (e.g., a PHP image-processing pipeline) to terminate. No public POC exists as of this analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 30, 2026
Memory exhaustion denial of service in ImageMagick before 7.1.2-13 allows a local attacker with write access to the OpenCL cache directory to crash the application by placing malformed XML files that trigger an unpatched memory leak in LoadOpenCLDeviceBenchmark(). The root cause is CWE-401: memory allocated during XML parsing of unclosed device elements is never freed, enabling a resource exhaustion attack. No public exploit code has been identified and exploitation has not been confirmed by CISA KEV; however, a patch commit and upstream advisory are available.
RemediationAI
Upgrade ImageMagick to version 7.1.2-13 or later, which incorporates the fix from upstream commit a52c1b402be08ef8ae193f28ac5b2e120f2fa26f (https://github.com/ImageMagick/ImageMagick/commit/a52c1b402be08ef8ae193f28ac5b2e120f2fa26f). The GitHub security advisory is at https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qp59-x883-77qv. If upgrading immediately is not feasible, restrict write permissions on the OpenCL cache directory (typically ~/.cache/ImageMagick or the system-level equivalent) to only the owning service account - this eliminates the attacker's ability to place a malicious XML file and fully neutralizes the attack vector. Disabling OpenCL support at build or configuration time (--without-opencl or equivalent) also removes this code path entirely, though it trades GPU acceleration for this mitigation. Neither workaround has meaningful side effects beyond the described trade-offs.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 20 packages in nuget, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ImageMagick (cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*) uses OpenCL to accelerate image processing on GPU-capable systems. On startup or during certain operations, it reads OpenCL device benchmark profiles from an XML file stored in a user-writable or system-level cache directory. The C function LoadOpenCLDeviceBenchmark() parses this XML and allocates memory for device descriptors. CWE-401 (Missing Release of Memory after Effective Lifetime) manifests here: when the parser encounters a device element that is not properly closed, the allocated memory for that element is never freed. Repeated triggering of this path - e.g., by repeatedly invoking operations that reload the cache - causes the process heap to grow unbounded, eventually leading to OOM conditions and process termination.
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:N/VI:N/VA:L/SC:N/SI:N/SA:N
Local-only attack (AV:L), write access to cache directory required (PR:H), crafted XML needed (AC:H); only low availability impact, no C or I.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
ImageMagick before 7.1.2-13 contains a memory leak vulnerability in LoadOpenCLDeviceBenchmark() function when parsing malformed OpenCL device profile XML files with unclosed device elements. Attackers with write access to the OpenCL cache directory can place malicious XML files to exhaust memory and cause denial of service.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
Unauthenticated attackers can write arbitrary files on a Ruby on Rails host and, when Active Storage uses the Disk servi
ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer
EUVD-2026-40447
GHSA-9gjp-pj3g-87pq
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB