CVE-2017-18254
Description
A memory leak in ImageMagick's WriteGIFImage function can be triggered by a crafted file, leading to denial of service via resource exhaustion.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in ImageMagick's WriteGIFImage function can be triggered by a crafted file, leading to denial of service via resource exhaustion.
Vulnerability
A memory leak vulnerability exists in ImageMagick 7.0.7 in the WriteGIFImage function within coders/gif.c. The issue occurs when memory allocation for global colormap or colormap buffers fails; if only one allocation succeeds, the other buffer is leaked because the error-handling path does not free the successfully allocated memory. An attacker can trigger this condition by providing a specially crafted GIF file that forces an allocation failure, leading to a denial of service via memory exhaustion [1] [2].
Exploitation
An attacker needs to deliver a crafted image file to a user or automated system that processes it with a vulnerable version of ImageMagick. No authentication or special privileges are required beyond access to the file. The attacker crafts a GIF file that causes AcquireQuantumMemory to return NULL for either global_colormap (line 1560) or colormap, while the other allocation succeeds. When the subsequent NULL check fails and ThrowWriterException is called, the successful allocation is not freed, resulting in a memory leak [2].
Impact
Successful exploitation causes a memory leak, leading to increasing memory consumption over repeated triggers. This can exhaust available memory resources, resulting in a denial of service for the application or system processing the image. The vulnerability does not allow code execution or data manipulation, but it can cause system instability or crash [1] [2].
Mitigation
The fix is included in ImageMagick versions updated after the disclosure. Ubuntu released a security update (USN-3681-1) which addressed this vulnerability; affected Ubuntu users should update to the fixed package versions listed in the advisory. For other distributions, users should update to a patched version of ImageMagick (e.g., 7.0.7-25 or later). No workaround is available other than avoiding processing untrusted GIF files until the patch is applied [1].
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
11- Range: =7.0.7
- osv-coords10 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%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3pkg: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%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2011%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP3pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2012%20SP3
< 1.2.5-78.47.1+ 9 more
- (no CPE)range: < 1.2.5-78.47.1
- (no CPE)range: < 1.2.5-78.47.1
- (no CPE)range: < 6.8.8.1-71.54.5
- (no CPE)range: < 6.4.3.6-78.45.1
- (no CPE)range: < 6.8.8.1-71.54.5
- (no CPE)range: < 6.4.3.6-78.45.1
- (no CPE)range: < 6.8.8.1-71.54.5
- (no CPE)range: < 6.4.3.6-78.45.1
- (no CPE)range: < 6.8.8.1-71.54.5
- (no CPE)range: < 6.8.8.1-71.54.5
Patches
0No patches discovered yet.
Vulnerability mechanics
No source-code context for this CVE — mechanics is only generated when we can read the actual fix diff. Without that, the four sections (root cause, attack vector, affected code, fix) would be speculation rather than analysis.
References
2- usn.ubuntu.com/3681-1/mitrevendor-advisoryx_refsource_UBUNTU
- github.com/ImageMagick/ImageMagick/issues/808mitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.