{"id":"CVE-2025-65955","published":"2025-12-02T23:02:58Z","modified":"2026-06-23T16:10:14Z","title":"ImageMagick has a use-after-free/double-free risk in Options::fontFamily when clearing family","vendor":"ImageMagick","product":"ImageMagick","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00171,"percentile":0.06401,"provenance":"source"},"cwes":[{"id":"CWE-415","name":"Double Free"},{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-q3hc-j9x5-mp9m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8","tags":["x_refsource_MISC"]},{"url":"https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8","tags":["x_refsource_MISC"]}],"priority":{"score":4.7,"factors":[{"name":"EPSS percentile","points":1.28},{"name":"CVSS severity","points":3.43}]},"vendorSlug":"imagemagick","affectedVersions":[{"vendor":"ImageMagick","product":"ImageMagick","versions":[">= 7.0.1-0, < 7.1.2-9","< 6.9.13-34"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-12-03T14:55:39.239086Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-200466","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-imagemagick-cve-2016-4562","parents":[{"from":"CVE-2016-4562","to":"CVE-2025-65955","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["MagickCore/draw.c"],"commits":["https://github.com/ImageMagick/ImageMagick/commit/726812fa2fa7ce16bcf58f6e115f65427a1c0950","https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8","https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8"],"basis":"shared function","functions":["GetDrawInfo"]}]},{"from":"CVE-2016-4563","to":"CVE-2025-65955","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["MagickCore/draw.c"],"commits":["https://github.com/ImageMagick/ImageMagick/commit/726812fa2fa7ce16bcf58f6e115f65427a1c0950","https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8","https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8"],"basis":"shared function","functions":["GetDrawInfo"]}]},{"from":"CVE-2016-4564","to":"CVE-2025-65955","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["MagickCore/draw.c"],"commits":["https://github.com/ImageMagick/ImageMagick/commit/726812fa2fa7ce16bcf58f6e115f65427a1c0950","https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8","https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8"],"basis":"shared function","functions":["GetDrawInfo"]}]}],"children":[{"from":"CVE-2025-65955","to":"CVE-2026-106573","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["MagickCore/draw.c"],"commits":["https://github.com/ImageMagick/ImageMagick/commit/6409f34d637a34a1c643632aa849371ec8b3b5a8","https://github.com/ImageMagick/ImageMagick/commit/6f81eb15f822ad86e8255be75efad6f9762c32f8","https://github.com/ImageMagick/ImageMagick/commit/c311471c4e4978494834c707b417bc033d95cc48"],"basis":"shared function","functions":["GetDrawInfo"]}]}]}}