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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
Lifecycle Timeline
1DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
More in Imagemagick
View allReadGIFImage 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
A vulnerability was found in ImageMagick. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
In ImageMagick 7.0.9-7 Q16, there is a use-after-free in the function MngInfoDiscardObject of coders/png.c, related to R
The ReadMATImageV4 function in coders/mat.c in ImageMagick 7.0.8-7 uses an uninitialized variable, leading to memory cor
Same weakness CWE-401 – Memory Leak
View allSame technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-40447
GHSA-9gjp-pj3g-87pq