What’s Vulnerable › Vulnerabilities
CVE-2026-59926: Mistune: XSS via unescaped class option in Admonition directive
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-08 · updated 2026-10-25
- Weakness: CWE-79
Description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, render_admonition() in src/mistune/directives/admonition.py concatenates the Admonition directive :class: option into the HTML class attribute without escaping, allowing attribute injection and cross-site scripting even when HTMLRenderer escape mode is enabled. This issue is fixed in version 3.2.1.
Affected products
- lepture mistune: before 3.3.0 — fixed in 3.3.0
How to fix
Upgrade to a fixed version: lepture mistune 3.3.0. Check the vendor advisory for mitigations.
References
- https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2
- https://github.com/lepture/mistune/releases/tag/v3.2.1
- https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h
Get alerted when CVE-2026-59926 or the next vulnerability affects your stack