Vulnerability · Published Jul 8, 2026 · Assigned by GitHub_M
CVE-2026-59926Mistune: XSS via unescaped class option in Admonition directive
Medium 5.3
In plain English
A medium-severity cross-site scripting in mistune from lepture. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 26% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | mistune | no fix listed | DEBIAN-CVE-2026-59926 |
| Debian:14 | mistune | 3.1.4-1 | DEBIAN-CVE-2026-59926 |
| PyPI | mistune | 3.3.0 | GHSA-g97x-gvcm-x72h |
| PyPI | mistune | 3.3.0 | PYSEC-2026-2214 |
| Ubuntu:22.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-59926 |
| Ubuntu:24.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-59926 |
| Ubuntu:25.10 | mistune | no fix listed | UBUNTU-CVE-2026-59926 |
| Ubuntu:26.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-59926 |
| Ubuntu:26.10 | mistune | no fix listed | UBUNTU-CVE-2026-59926 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
References
- https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h x_refsource_CONFIRM
- https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2 x_refsource_MISC
- https://github.com/lepture/mistune/releases/tag/v3.2.1 x_refsource_MISC