Vulnerability · Published Dec 2, 2025 · Assigned by GitHub_M
CVE-2025-65955ImageMagick has a use-after-free/double-free risk in Options::fontFamily when clearing family
Medium 4.9
In plain English
A medium-severity double free in ImageMagick from ImageMagick. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to 7.1.2-9 and 6.9.13-34, there is a vulnerability in ImageMagick’s Magick++ layer that manifests when Options::fontFamily is invoked with an empty string. Clearing a font family calls RelinquishMagickMemory on _drawInfo->font, freeing the font string but leaving _drawInfo->font pointing to freed memory while _drawInfo->family is set to that (now-invalid) pointer. Any later cleanup or reuse of _drawInfo->font re-frees or dereferences dangling memory. DestroyDrawInfo and other setters (Options::font, Image::font) assume _drawInfo->font remains valid, so destruction or subsequent updates trigger crashes or heap corruption. This vulnerability is fixed in 7.1.2-9 and 6.9.13-34.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | imagemagick | 8:6.9.11.60+dfsg-1.6+deb12u5 | DEBIAN-CVE-2025-65955 |
| Debian:13 | imagemagick | 8:7.1.1.43+dfsg1-1+deb13u4 | DEBIAN-CVE-2025-65955 |
| Debian:14 | imagemagick | 8:7.1.2.12+dfsg1-1 | DEBIAN-CVE-2025-65955 |
| NuGet | magick.net-q16-anycpu | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-arm64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-hdri-anycpu | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-hdri-arm64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-hdri-openmp-arm64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-hdri-openmp-x64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-hdri-x64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-hdri-x86 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-openmp-arm64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-openmp-x64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-x64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q16-x86 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q8-anycpu | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q8-arm64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q8-openmp-arm64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q8-openmp-x64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q8-x64 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| NuGet | magick.net-q8-x86 | no fix listed | GHSA-q3hc-j9x5-mp9m |
| Ubuntu:25.10 | imagemagick | no fix listed | UBUNTU-CVE-2025-65955 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ImageMagick | ImageMagick | >= 7.0.1-0, < 7.1.2-9< 6.9.13-34 |
Weakness: CWE-415, CWE-416 · Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
References
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-q3hc-j9x5-mp9m x_refsource_CONFIRM
- https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8 x_refsource_MISC
- https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8 x_refsource_MISC