Mistune: XSS via unescaped class option in Admonition directive
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.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Python (PyPI) | mistune | < 3.3.0 | 3.3.0 |
Odnośniki
- https://github.com/lepture/mistune/releases/tag/v3.2.1
- https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h
- https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2
- https://nvd.nist.gov/vuln/detail/CVE-2026-59926
- https://github.com/lepture/mistune
- https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-2214.yaml
- Wektor CVSS
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- Słabość (CWE)
CWE-79- Platforma
- Python (PyPI)
- Paczka
mistune- Ujawniono
- 08.07.2026
- Aktualizacja
- 11.10.2026 14:18
Źródła i licencje
OSV / GitHub Advisory Database - PYSEC-2026-2214 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-g97x-gvcm-x72h - CC BY 4.0
Historia podatności: mistune
Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 20
- Pierwsza → ostatnia
- 10.2017 09.2026
- Bez poprawki
- 1
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 7
- Średnia 13
Ujawnienia w latach
- 2017: 2
- 2018: 0
- 2019: 0
- 2020: 0
- 2021: 0
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 17
-
Mistune: XSS via unescaped class option in Admonition directive ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.