Junglewise Threat Intelligence

CVE-2025-65955: ImageMagick use-after-free in Magick++ Options::fontFamily

CVE-2025-65955 · Severity: medium · CVSS 4.9 · Published 2025-12-02

Technologies: Magick.NET-Q16-OpenMP-arm64 (NuGet), Magick.NET-Q16-AnyCPU (NuGet), Magick.NET-Q16-HDRI-AnyCPU (NuGet), Magick.NET-Q8-x86 (NuGet), Magick.NET-Q8-AnyCPU (NuGet), Magick.NET-Q16-arm64 (NuGet), Magick.NET-Q16-OpenMP-x64 (NuGet), ImageMagick, Magick.NET-Q16-HDRI-OpenMP-x64 (NuGet), Magick.NET-Q16-HDRI-arm64 (NuGet), Magick.NET-Q16-HDRI-x86 (NuGet), Magick.NET-Q16-HDRI-x64 (NuGet), Magick.NET-Q8-OpenMP-arm64 (NuGet), Magick.NET-Q8-OpenMP-x64 (NuGet), Magick.NET-Q16-x64 (NuGet), Magick.NET-Q8-arm64 (NuGet), Magick.NET-Q8-x64 (NuGet), Magick.NET-Q16-x86 (NuGet), Magick.NET-Q16-HDRI-OpenMP-arm64 (NuGet). Vendors: NuGet, ImageMagick.

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

References

Related threats