In ImageMagick before 6.9.8-5 and 7.x before 7.0.5-6, there is a memory leak in the ReadMATImage function in coders/mat.c. https://nvd.nist.gov/vuln/detail/CVE-2017-13146