mistune
Affected
- introduced
0, fixed3.3.0(ecosystem)
Fixed versions
3.3.0
Fix
- Fixed version
3.3.0pip install --upgrade mistune==3.3.0
Advisory
Also known as: CVE-2026-59926, PYSEC-2026-2214
Mistune: XSS via unescaped class option in Admonition directive
In src/mistune/directives/admonition.py, the render_admonition() function concatenates the :class: option directly into the HTML class attribute without escaping (lines 63-68).
This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used.
The directive name parameter is safe (validated against whitelist), but the class option comes from raw user input.
Medium Basis: The source's own band: MODERATE
0, fixed 3.3.0 (ecosystem)3.3.0
3.3.0pip install --upgrade mistune==3.3.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0