The article doesn't reveal much, but judging from the list of vulnerable coders and the fact that the Imagemagick forum post references the delegates.xml file, I imagine the exploit allows users to create their own delegate [0], then upload an image that causes that delegate to be called. My guess is that the exploit is two parts: 1) appending a line to the delegates.xml file by exploiting a vulnerable coder, and 2) exploiting the custom delegate you create.<p>Delegates seem very dangerous and there's all sorts of ways to exploit a custom delegate.<p>I'm surprised we haven't seen more Imagemagick vulnerabilities... it's a really old library with a massive codebase supporting tons of file formats and arbitrary command chaining. And it's often called by higher level languages via functions like `system()` or `shell()` where developers could easily neglect to "properly sanitize" user inputs, since what those "inputs" can be is so wide ranging.<p>[0] <a href="http://www.imagemagick.org/Usage/files/#delegates" rel="nofollow">http://www.imagemagick.org/Usage/files/#delegates</a><p>EDIT:<p>Looks like I was right... check out this commit from 3 days ago:<p><a href="https://github.com/ImageMagick/ImageMagick/commit/06c41aba39b97203f6b9a0be6a2ccf8888cddc93" rel="nofollow">https://github.com/ImageMagick/ImageMagick/commit/06c41aba39...</a><p>"Sanitize input filename for http / https delegates"<p>So presumably the attack is to set the "filename" property of a file such that when including '%f' in a command, the filename breaks the shell command and inserts its own arbitrary code.<p>EDIT 2:<p>A reddit user also linked to this critical line: <a href="https://github.com/ImageMagick/ImageMagick/blob/e93e339c0a44cec16c08d78241f7aa3754485004/MagickCore/delegate.c#L99" rel="nofollow">https://github.com/ImageMagick/ImageMagick/blob/e93e339c0a44...</a><p>So the process would be something like this:<p>1) Create file with name e.g. evilserver.com/funnycat';rm-rf/;.gif hosted on remote server<p>2) Somehow instruct vulnerable imagemagick install to download evilserver.com/funnycat';rm-rf/;.gif<p>3) Assume 99% chance that the render command on server will include %f, which is unsanitized, and will cause rm -rf / to execute<p>I'm a bit confused on step (2)... how do you tell imagemagick to download a file? Will this only affect installations that are explicitly downloading untrusted URLs from users? Like if imgur "upload via URL" fed the URL directly to imagemagick, it would be vulnerable...