CVE-2026-40311: Imagemagick Xmp Tree Tag Injection

XMP property tags parsed from an XML tree are directly added to the image properties splay tree without validation. This allows injection of wildcard tags (ending in ':*'), which can cause heap use-after-free vulnerabilities when properties are queried dynamically. Sanitize tags prior to addition.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-40311-imagemagick-xmp-tree-tag-injection --engine opengrep

Description

XMP property tags parsed from an XML tree are directly added to the image properties splay tree without validation. This allows injection of wildcard tags (ending in ':*'), which can cause heap use-after-free vulnerabilities when properties are queried dynamically. Sanitize tags prior to addition.