Impact
Mistune is a Python Markdown parser. In versions prior to 3.3.0, the HTMLRenderer.safe_url() method fails to block percent‑encoded javascript: URIs. An attacker can supply a Markdown link or image containing such an encoded URI, causing the rendered HTML to execute arbitrary JavaScript in the visitor’s browser. This is a client‑side XSS vulnerability (CWE‑79).
Affected Systems
Any deployment of the mistune Python package from the lepture organization that is affected. The issue has been fixed in release 3.3.0; upgrading to that or a later version removes the ability to render percent‑encoded javascript URIs via safe_url()
Risk and Exploitability
The CVSS score of 6.1 indicates moderate severity. The EPSS score is < 1%, indicating a very low but non‑zero exploitation probability. The vulnerability is not listed in the CISA KEV catalog, suggesting no widely documented exploitation. Based on the description, the likely attack vector involves an attacker providing crafted Markdown content to an application that renders it with mistune, leading to script execution in the end‑user’s browser. The flaw does not affect server‑side state, but the risk remains significant for any site that accepts or displays untrusted Markdown. Given the moderate score and low EPSS score, the risk is moderate but non‑negligible for exposed systems.
OpenCVE Enrichment
Github GHSA