{"id":"CVE-2026-59926","published":"2026-07-08T16:16:15Z","modified":"2026-07-08T19:40:52Z","title":"Mistune: XSS via unescaped class option in Admonition directive","vendor":"lepture","product":"mistune","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00327,"percentile":0.18222,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2","tags":["x_refsource_MISC"]},{"url":"https://github.com/lepture/mistune/releases/tag/v3.2.1","tags":["x_refsource_MISC"]}],"priority":{"score":7.4,"factors":[{"name":"EPSS percentile","points":3.64},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"lepture","affectedVersions":[{"vendor":"lepture","product":"mistune","versions":["< 3.2.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-08T17:48:29.407727Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mistune","vulnerableRanges":["<3.3.0"],"patched":["3.3.0"],"from":["GHSA-g97x-gvcm-x72h","PYSEC-2026-2214"],"provenance":"source"}],"summary":{"text":"In Mistune, a Python Markdown parser, the Admonition directive's render_admonition() function in directives/admonition.py concatenates the :class: option into the HTML class attribute without escaping it. An attacker who can supply Markdown content that a victim views can inject attributes and run cross-site scripting, and this works even when HTMLRenderer's escape mode is enabled, provided the victim interacts with the page (for example by viewing or clicking the rendered content).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:10:09Z"},"euvd":{"id":"EUVD-2026-42334","exploited":false,"provenance":"source"}}