Libgd version 2.2.5 contains a Double Free Vulnerability vulnerability in gdImageBmpPtr Function that can result in Remote Code Execution . This attack appear to be exploitable via Specially Crafted Jpeg Image can trigger double free. This vulnerability appears to have been fixed in after commit ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5.
https://usn.ubuntu.com/3755-1/
https://security.gentoo.org/glsa/201903-18
https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html