Description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, the mistune math plugin renders inline math ($...$) and block math ($$...$$) by concatenating the raw user-supplied content directly into the HTML output without any HTML escaping. This occurs even when the parser is explicitly created with escape=True, which is supposed to guarantee that all user-controlled text is sanitised before reaching the DOM. This vulnerability is fixed in 3.2.1.
Affected products
mistune_project: mistune
References3
- github.com/lepture/mistune/security/advisories/GHSA-8g87-j6q8-g… ExploitVendor Advisory
- github.com/lepture/mistune/security/advisories/GHSA-8g87-j6q8-g… ExploitVendor Advisory
- github.com/lepture/mistune/releases/tag/v3.2.1 ProductRelease Notes
Metrics
- CVSS 3.1
-
6.1
MEDIUM
Score source: CNA
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - EPSS — exploit probability
- 0% percentile: 14 · as of 14 November 2026
- CWE
- CWE-79
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.