The issue is related to the ReadWPGImage function in GraphicsMagick, which is vulnerable due to a null pointer dereference. This can be exploited by a remote attacker using a specially crafted WPG file, potentially allowing them to execute arbitrary code. Additionally, the function does not properly validate colormapped images, which can lead to a denial of service, causing the application to crash due to an invalid write.