vendor:
ImageMagick
by:
stewie, Nikolay Ermishkin, wvu, hdm
8.4
CVSS
HIGH
Shell Command Injection
78
CWE
Product Name: ImageMagick
Affected Version From: <= 7.0.1-0 and <= 6.9.3-9 (legacy)
Affected Version To:
Patch Exists: YES
Related CWE: CVE-2016-3714
CPE: a:imagemagick:imagemagick
Metasploit:
https://www.rapid7.com/db/vulnerabilities/oracle_linux-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/centos_linux-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/suse-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/amazon_linux-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/alpine-linux-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/huawei-euleros-2_0_sp1-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/oracle-solaris-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/debian-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/gentoo-linux-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/f5-big-ip-cve-2016-3714/, https://www.rapid7.com/db/vulnerabilities/ubuntu-cve-2016-3714/
Platforms Tested: Linux, BSD, OS X
2016
ImageMagick Delegate Arbitrary Command Execution
This module exploits a shell command injection in the way "delegates" (commands for converting files) are processed in ImageMagick versions <= 7.0.1-0 and <= 6.9.3-9 (legacy). Since ImageMagick uses file magic to detect file format, you can create a .png (for example) which is actually a crafted SVG (for example) that triggers the command injection. Tested on Linux, BSD, and OS X. You'll want to choose your payload carefully due to portability concerns. Use cmd/unix/generic if need be.
Mitigation:
Upgrade to ImageMagick version 7.0.1-1 or 6.9.3-10 or later. Additionally, you can disable delegates by editing the `delegates.xml` file and removing the `<delegate>` entries.