The WriteTHUMBNAILImage function in coders/thumbnail.c in ImageMagick through 7.0.6-10 allows an attacker to cause a denial of service (buffer over-read) by sending a crafted JPEG file.
https://github.com/ImageMagick/ImageMagick/issues/705
https://security.gentoo.org/glsa/201711-07
https://usn.ubuntu.com/3681-1/