CVE-2017-12667
Description
ImageMagick 7.0.6-1 has a memory leak in ReadMATImage when processing corrupt MAT files, leading to resource exhaustion.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
ImageMagick 7.0.6-1 has a memory leak in ReadMATImage when processing corrupt MAT files, leading to resource exhaustion.
Vulnerability
ImageMagick version 7.0.6-1 contains a memory leak vulnerability in the ReadMATImage function located in coders/mat.c [1]. When a malformed MAT file is processed, the code path that jumps to the MATLAB_KO label does not properly deallocate the clone_info structure before throwing an exception, resulting in unreleased memory allocations [2]. This affects all systems using this version of ImageMagick to process MATLAB MAT files.
Exploitation
An attacker can trigger the vulnerability by providing a specially crafted MAT file that fails the header identifier check (strncmp(MATLAB_HDR.identific, "MATLAB", 6) != 0) [1]. The attacker only needs to deliver this file to a victim who then processes it with ImageMagick's identify or convert commands. No authentication or special privileges are required beyond the ability to supply the malformed file as input.
Impact
Successful exploitation causes a direct memory leak of at least 13,024 bytes and indirect leaks of 9,096 and 88 bytes [1]. Repeated processing of malicious MAT files can lead to memory exhaustion, potentially causing denial of service (DoS) by crashing the application or causing the system to become unresponsive. The CIA outcome is primarily availability impact, with no direct confidentiality or integrity compromise.
Mitigation
A fix was committed by ImageMagick on an unspecified date in commit bfb7915 which adds clone_info=DestroyImageInfo(clone_info); before the ThrowReaderException call in the error handler [2]. Users should upgrade to a version of ImageMagick that includes this fix (e.g., 7.0.6-2 or later). If upgrading is not possible, avoid processing MAT files from untrusted sources as a workaround. This CVE is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog as of this writing.
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
16cpe:2.3:a:imagemagick:imagemagick:7.0.6-1:*:*:*:*:*:*:*+ 1 more
- cpe:2.3:a:imagemagick:imagemagick:7.0.6-1:*:*:*:*:*:*:*
- (no CPE)range: =7.0.6-1
- osv-coords14 versionspkg: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
< 6.8.8.1-71.26.1+ 13 more
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.4.3.6-7.78.22.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.4.3.6-7.78.22.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.4.3.6-7.78.22.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.1
- (no CPE)range: < 6.8.8.1-71.26.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/bfb7915d4b2e11acb6a819e451c382dc645277dbnvdPatchVendor Advisory
- github.com/ImageMagick/ImageMagick/issues/553nvdIssue TrackingPatchVendor Advisory
News mentions
0No linked articles in our index yet.