Impact
Mistune versions before 3.3.0 contain an XSS flaw that processes the Include directive to insert the contents of .html, .xhtml, or .htm files as raw block_html tokens without escaping when escape=False is provided. Attackers who can place an HTML file that the renderer can read and reference with the Include directive, possibly manipulating the path, can embed JavaScript that will be executed in the browsers of any users who render the markdown. The vulnerability enables only client‑side code execution and does not provide direct access to server resources.
Affected Systems
The vulnerability affects the Mistune markdown engine from the Mistune project, all releases older than 3.3.0. The issue manifests when the Include directive processes included HTML files as raw output rather than escaping special characters.
Risk and Exploitability
The CVSS score of 5.3 indicates moderate severity. The EPSS score is not available and the flaw is not included in CISA’s KEV catalog, implying limited evidence of widespread exploitation. Exploitation requires the attacker to introduce a writable HTML file that the renderer can include and to invoke the Include directive with escape=False, which may be achieved through a file upload feature or path traversal vulnerability. Once triggered, the stored script is executed in every user’s browser that renders the affected markdown.
OpenCVE Enrichment