VYPR
High severity8.8NVD Advisory· Published Aug 6, 2017· Updated May 13, 2026

CVE-2017-12587

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

18

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.