CVE-2017-12668
Description
ImageMagick 7.0.6-2 has a memory leak in WritePCXImage when converting images to PCX format, which can cause resource exhaustion.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
ImageMagick 7.0.6-2 has a memory leak in WritePCXImage when converting images to PCX format, which can cause resource exhaustion.
Vulnerability
ImageMagick version 7.0.6-2 contains a memory leak vulnerability in the WritePCXImage function in coders/pcx.c [1]. When converting an image to the PCX format, memory allocated for pcx_colormap (in AcquireQuantumMemory at line 987) is not properly freed if a subsequent memory allocation for pixel_info fails. This results in a direct leak of 768 bytes per failed operation, as confirmed by AddressSanitizer traces [1].
Exploitation
An attacker can trigger this vulnerability by providing a crafted image file to ImageMagick's convert utility and requesting PCX output (./magick convert $FILE out.pcx) [1]. The attacker does not require authentication or special privileges; any user who can invoke ImageMagick image processing on arbitrary files can exploit it. The exploitation sequence involves the application performing the PCX write operation under conditions that cause the second memory allocation to fail, thus leaking the previously allocated colormap memory.
Impact
Successful exploitation results in a memory leak, which over multiple image conversions can lead to resource exhaustion (denial of service). The vulnerability is rated High (CVSS v3 8.8) due to the low attack complexity and network attack vector via file upload vector [1]. While no remote code execution or data disclosure is directly possible, the memory exhaustion can cause the application or system to become unresponsive.
Mitigation
The fix was committed in commit 2ba8f335fa06daf1165e0878462686028e633a74 [2]. The patch adds a call to RelinquishMagickMemory(pcx_colormap) before throwing the ResourceLimitError exception when the virtual memory allocation for pixel_info fails [2]. Users should upgrade to a version of ImageMagick later than 7.0.6-2 that includes this commit. No workaround is available other than avoiding PCX output untrusted images before patching.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
18cpe:2.3:a:imagemagick:imagemagick:7.0.6-2:*:*:*:*:*:*:*+ 1 more
- cpe:2.3:a:imagemagick:imagemagick:7.0.6-2:*:*:*:*:*:*:*
- (no CPE)range: = 7.0.6-2
- osv-coords16 versionspkg:rpm/suse/GraphicsMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2011%20SP4pkg:rpm/suse/GraphicsMagick&distro=SUSE%20Studio%20Onsite%201.3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP2pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%20for%20Raspberry%20Pi%2012%20SP2pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2011%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP2pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2011%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP2pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2012%20SP2pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2012%20SP3
< 1.2.5-4.78.38.1+ 15 more
- (no CPE)range: < 1.2.5-4.78.38.1
- (no CPE)range: < 1.2.5-4.78.38.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.4.3.6-7.78.34.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.4.3.6-7.78.34.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.4.3.6-7.78.34.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
- (no CPE)range: < 6.8.8.1-71.42.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
2- github.com/ImageMagick/ImageMagick/commit/2ba8f335fa06daf1165e0878462686028e633a74nvdPatchVendor Advisory
- github.com/ImageMagick/ImageMagick/issues/575nvdIssue TrackingPatchVendor Advisory
News mentions
0No linked articles in our index yet.