Insufficient shell characters filtering leads to (potentially remote) code execution (CVE-2016-3714)
ImageMagick's image coders passed crafted image content into shell commands without properly filtering shell metacharacters. A remote attacker could supply a malicious image and have arbitrary commands executed on the server processing it.
- Fixed in 12 days
- Paid in 50 days
- Disclosed after 12 days
The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allow remote attackers to execute arbitrary code via shell metacharacters in a crafted image, aka "ImageTragick."
See also: http://www.openwall.com/lists/oss-security/2016/05/03/18 https://imagetragick.com/
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
What the attacker needed
Victim processes an attacker-supplied image; affected ImageMagick version in use
The fix
It was fixed in ImageMagick 6.9.3-10 and 7.0.1-1.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
ImageMagick is a widely used tool for converting and resizing images. It sometimes hands parts of an image's contents to the operating system's command shell, and if those contents include special shell characters, the shell treats them as commands. That let an attacker who could get an image processed run their own commands on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.