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.

Severity (CVSS 3.1)4.9Medium
Exploit odds (30 days)0.2%top 93.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12imagemagick8:6.9.11.60+dfsg-1.6+deb12u5DEBIAN-CVE-2025-65955
Debian:13imagemagick8:7.1.1.43+dfsg1-1+deb13u4DEBIAN-CVE-2025-65955
Debian:14imagemagick8:7.1.2.12+dfsg1-1DEBIAN-CVE-2025-65955
NuGetmagick.net-q16-anycpuno fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-arm64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-hdri-anycpuno fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-hdri-arm64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-hdri-openmp-arm64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-hdri-openmp-x64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-hdri-x64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-hdri-x86no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-openmp-arm64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-openmp-x64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-x64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q16-x86no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q8-anycpuno fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q8-arm64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q8-openmp-arm64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q8-openmp-x64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q8-x64no fix listedGHSA-q3hc-j9x5-mp9m
NuGetmagick.net-q8-x86no fix listedGHSA-q3hc-j9x5-mp9m
Ubuntu:25.10imagemagickno fix listedUBUNTU-CVE-2025-65955

Affected products (as reported)

VendorProductVersions
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