Cross-site scripting in Comrak - #VU173135
Published: December 3, 2026
Vulnerability details
The vulnerability allows a remote attacker to inject active HTML or script-capable links into a rendered document.
The vulnerability exists due to improper escaping of link URL entities and inconsistent handling of carriage returns in Comrak's format_commonmark serializer when it writes Markdown from an untrusted syntax tree. A remote attacker can supply crafted link or code block content that is interpreted as active content when the serialized Markdown is reparsed and rendered with raw HTML enabled.