CVE-2017-12587
Description
A large loop vulnerability in ImageMagick 7.0.6-1's ReadPWPImage function allows denial of service or code execution via crafted image.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A large loop vulnerability in ImageMagick 7.0.6-1's ReadPWPImage function allows denial of service or code execution via crafted image.
Vulnerability
In ImageMagick 7.0.6-1, the ReadPWPImage function in coders/pwp.c contains a large loop where filesize is computed from user-controlled bytes (magick[2], magick[1], magick[0]) and the loop iterates that many times calling ReadBlobByte without success checking [2]. This allows a crafted file to set filesize to an extremely large value (up to 65535*255), causing an excessive loop.
Exploitation
An attacker can exploit this by supplying a specially crafted image file to a user or automated system using ImageMagick [1]. No authentication is required; the victim only needs to open the file (e.g., via identify). The crafted file triggers the loop to run for an enormous number of iterations, each performing a potentially failing read operation [2].
Impact
Successful exploitation leads to denial of service due to CPU resource exhaustion [2]. The official Ubuntu advisory also notes that it could possibly allow arbitrary code execution with the privileges of the user running ImageMagick [1].
Mitigation
The vulnerability is fixed in ImageMagick updates released in Ubuntu 18.04 LTS and other distributions via USN-3681-1 [1]. Users should update their ImageMagick installation to the latest patched version. No workaround is documented besides applying the patch.
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-1:*:*:*:*:*:*:*+ 1 more
- cpe:2.3:a:imagemagick:imagemagick:7.0.6-1:*:*:*:*:*:*:*
- (no CPE)range: =7.0.6-1
- 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.19.1+ 15 more
- (no CPE)range: < 1.2.5-4.78.19.1
- (no CPE)range: < 1.2.5-4.78.19.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.4.3.6-7.78.14.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.4.3.6-7.78.14.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.4.3.6-7.78.14.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
- (no CPE)range: < 6.8.8.1-71.17.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/ImageMagick/ImageMagick/issues/535nvdIssue TrackingPatchThird Party Advisory
- lists.debian.org/debian-lts-announce/2019/05/msg00015.htmlnvd
- usn.ubuntu.com/3681-1/nvd
- www.debian.org/security/2017/dsa-4019nvd
News mentions
0No linked articles in our index yet.