Résumé
Mistune: XSS via unescaped class option in Admonition directive
Détails de l’avis
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.
Références
- https://github.com/advisories/GHSA-g97x-gvcm-x72h
- https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h
- https://nvd.nist.gov/vuln/detail/CVE-2026-59926
- https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2
- https://github.com/lepture/mistune/releases/tag/v3.2.1
- https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-2214.yaml
Vulnérabilités liées
Tout Supply chain →- MEDIUMCVE-2026-63670
ApostropheCMS: Mutation-XSS / allowedTags bypass via literal `</textarea/>` solidus close
- MEDIUMCVE-2026-73295
Material for MkDocs: DOM XSS in search suggestions via query parameter
- HIGHGHSA-99rq-75j6-5j9f
SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass
- MEDIUMCVE-2026-68921
DiceBear: SVG injection via the unescaped rotate option in @dicebear/core (and fontSize/fontWeight in @dicebear/initials)
- MEDIUMCVE-2026-82396
Sulu: Stored XSS via media download inline-disposition override
- MEDIUMGHSA-cp6q-959q-f8rh
Tiptap: mergeAttributes() turns an own __proto__ key into inherited executable DOM attributes