CVE-2025-65955ImageMagick has a use-after-free/double-free risk in Options::fontFamily when clearing…
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.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | imagemagick | Not affected vulnerable_code_not_present | ||
| Debian 14 | imagemagick | Fixed | 8:7.1.2.12+dfsg1-1 | DEBIAN-CVE-2025-65955 |
| Debian 13 | imagemagick | Fixed | 8:7.1.1.43+dfsg1-1+deb13u4 | DEBIAN-CVE-2025-65955 |
| Debian 12 | imagemagick | Fixed | 8:6.9.11.60+dfsg-1.6+deb12u5 | DEBIAN-CVE-2025-65955 |
| Red Hat Enterprise Linux 7 | ImageMagick | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ImageMagick-c++ | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ImageMagick-c++-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ImageMagick-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ImageMagick-doc | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ImageMagick-perl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ImageMagick | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ImageMagick-c++ | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ImageMagick-c++-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ImageMagick-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ImageMagick-doc | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ImageMagick-perl | Will not fix Out of support scope |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- ImageMagick: affected: >= 7.0.1-0, < 7.1.2-9, < 6.9.13-34
References
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-q3hc-j9x5-mp9m
- https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8
- https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.