WritePNMImage in coders/pnm.c in GraphicsMagick 1.3.26 allows remote attackers to cause a denial of service (bit_stream.c MagickBitStreamMSBWrite heap-based buffer overflow and application crash) or possibly have unspecified other impact via a crafted file.
https://www.debian.org/security/2018/dsa-4321
https://usn.ubuntu.com/4248-1/
https://sourceforge.net/p/graphicsmagick/bugs/525/
https://lists.debian.org/debian-lts-announce/2018/06/msg00009.html
https://lists.debian.org/debian-lts-announce/2018/01/msg00005.html
http://www.securityfocus.com/bid/102158
http://hg.code.sf.net/p/graphicsmagick/code/rev/f1c418ef0260