p PatchFirst

CVE-2025-65955

CVE-2025-65955 · ImageMagick has a use-after-free/double-free risk in Options::fontFamily when clearing family

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 4.9 · Medium · EPSS 0.2% · Fix available

Published
Updated

Stack: system

Affected products and versions

  • imagemagick

    Versions
    • >= 7.0.1-0, < 7.1.2-9: Affected
    • < 6.9.13-34: Affected

    No fix published

  • imagemagick Debian:12

    Versions
    • 8:6.9.11.60+dfsg-1.6
    • 8:6.9.11.60+dfsg-1.6+deb12u1
    • 8:6.9.11.60+dfsg-1.6+deb12u2
    • 8:6.9.11.60+dfsg-1.6+deb12u3
    • 8:6.9.11.60+dfsg-1.6+deb12u4
    Affected ranges
    • ECOSYSTEM: < 8:6.9.11.60+dfsg-1.6+deb12u5

    Update to 8:6.9.11.60+dfsg-1.6+deb12u5

  • imagemagick Debian:13

    Versions
    • 8:7.1.1.43+dfsg1-1
    • 8:7.1.1.43+dfsg1-1+deb13u1
    • 8:7.1.1.43+dfsg1-1+deb13u2
    • 8:7.1.1.43+dfsg1-1+deb13u3
    Affected ranges
    • ECOSYSTEM: < 8:7.1.1.43+dfsg1-1+deb13u4

    Update to 8:7.1.1.43+dfsg1-1+deb13u4

  • imagemagick Debian:14

    Versions
    • 8:7.1.1.43+dfsg1-1
    • 8:7.1.1.46+dfsg1-1
    • 8:7.1.1.47+dfsg1-1
    • 8:7.1.1.47+dfsg1-2
    • 8:7.1.2.1+dfsg1-1
    • 8:7.1.2.3+dfsg1-1
    • 8:7.1.2.7+dfsg1-1
    • 8:7.1.2.8+dfsg1-1
    Affected ranges
    • ECOSYSTEM: < 8:7.1.2.12+dfsg1-1

    Update to 8:7.1.2.12+dfsg1-1

Original sources

Check your server →