# CVE-2026-59926: Mistune: XSS via unescaped class option in Admonition directive

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Published: 2026-07-08T16:16:15.681Z
- Modified: 2026-10-25T17:10:00.197Z
- Also known as: GHSA-g97x-gvcm-x72h, PYSEC-2026-2214
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- lepture mistune: < 3.2.1
- mistune (PyPI): before 3.3.0
- mistune_project mistune: before 3.3.0

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h> (advisory, vendor-advisory, web)
- <https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2> (fix, patch, web)
- <https://github.com/lepture/mistune/releases/tag/v3.2.1> (advisory, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59926> (advisory)
- <https://github.com/lepture/mistune> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-2214.yaml> (web)

## Sources

- CVE List: [CVE-2026-59926](https://www.cve.org/CVERecord?id=CVE-2026-59926), CVE Terms of Use, modified 2026-07-08
- GitHub Advisory Database: [GHSA-g97x-gvcm-x72h](https://github.com/advisories/GHSA-g97x-gvcm-x72h), CC-BY-4.0, modified 2026-07-20
- NVD: [CVE-2026-59926](https://nvd.nist.gov/vuln/detail/CVE-2026-59926), Public domain, modified 2026-10-25
- PyPA Advisory Database: [PYSEC-2026-2214](https://osv.dev/vulnerability/PYSEC-2026-2214), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-59926 · Whole record: https://cve.day/CVE-2026-59926.json · Rebuilt by cve.day 2026-11-25T22:59:27.405Z
