What’s Vulnerable › Vulnerabilities
CVE-2017-12877
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2017-08-28 · updated 2026-06-17
- Weakness: CWE-416
Description
Use-after-free vulnerability in the DestroyImage function in image.c in ImageMagick before 7.0.6-6 allows remote attackers to cause a denial of service via a crafted file.
Affected products
- Canonical Ubuntu Linux: 14.04, 16.04, 17.10, 18.04
- Debian Linux: 8.0, 9.0
- ImageMagick: before 6.9.9-6; from 7.0.0-0 before 7.0.6-6 — fixed in 6.9.9-6, 7.0.6-6
How to fix
Upgrade to a fixed version: ImageMagick 6.9.9-6, 7.0.6-6. Check the vendor advisory for mitigations.
References
- http://www.openwall.com/lists/oss-security/2017/08/16/2
- https://blogs.gentoo.org/ago/2017/08/10/imagemagick-use-after-free-in-destroyimage-image-c/
- https://github.com/ImageMagick/ImageMagick/commit/04178de2247e353fc095846784b9a10fefdbf890
- https://security.gentoo.org/glsa/201711-07
- https://usn.ubuntu.com/3681-1/
- https://www.debian.org/security/2017/dsa-4040
- https://www.debian.org/security/2017/dsa-4074
- http://www.openwall.com/lists/oss-security/2017/08/16/2
- https://blogs.gentoo.org/ago/2017/08/10/imagemagick-use-after-free-in-destroyimage-image-c/
- https://github.com/ImageMagick/ImageMagick/commit/04178de2247e353fc095846784b9a10fefdbf890
- https://security.gentoo.org/glsa/201711-07
- https://usn.ubuntu.com/3681-1/
Get alerted when CVE-2017-12877 or the next vulnerability affects your stack