Executive brief
ImageMagick is a widely used open-source library for processing and editing digital images. A flaw in its C++ programming interface (Magick++) can cause the software to crash or behave unpredictably when an application attempts to clear a font setting. This could lead to service interruptions or potentially allow an attacker to gain unauthorized access to system memory in specific local environments.
Technical details
A vulnerability exists in ImageMagick's Magick++ layer within the Options::fontFamily method. When invoked with an empty string, the code incorrectly calls RelinquishMagickMemory on _drawInfo->font instead of _drawInfo->family. This frees the font string while leaving a dangling pointer in _drawInfo->font, which is subsequently re-freed or dereferenced during object destruction or further updates (CWE-415, CWE-416). The attack vector is local and requires the target application to use the Magick++ API; it cannot be triggered via standard command-line utilities. Exploitation can result in a denial-of-service (crash) or potential memory corruption. The issue is fixed in versions 7.1.2-9 and 6.9.13-34.
Affected products
- ImageMagick ImageMagick >= 7.0.1-0, < 7.1.2-9; < 6.9.13-34
Timeline
- 2025-12-02: advisory: GHSA-q3hc-j9x5-mp9m published
- 2025-12-02: disclosed
- 2025-12-02: patched