mistune Cross-site scripting (XSS) vulnerability
Cross-site scripting (XSS) vulnerability in the _keyify function in mistune.py in Mistune before 0.8.1 allows remote attackers to inject arbitrary web script or HTML by leveraging failure to escape the "key" argument.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | mistune | < 0.8.1 | 0.8.1 |
References
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NUR3GMHQBMA3UC4PFMCK6GCLOQC4LQQC/
- https://github.com/lepture/mistune/commit/5f06d724bc05580e7f203db2d4a4905fc1127f98
- https://github.com/lepture/mistune/blob/master/CHANGES.rst
- https://bugzilla.redhat.com/show_bug.cgi?id=1524596
- https://github.com/advisories/GHSA-98gj-wwxm-cj3h
- https://nvd.nist.gov/vuln/detail/CVE-2017-16876
- https://github.com/lepture/mistune
- https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2017-18.yaml
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NUR3GMHQBMA3UC4PFMCK6GCLOQC4LQQC
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- Python (PyPI)
- Package
mistune- Disclosed
- 29.12.2017
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2017-18 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-98gj-wwxm-cj3h - CC BY 4.0
Vulnerability history: mistune
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 20
- First → latest
- 10.2017 09.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- High 7
- Medium 13
Disclosures per year
- 2017: 2
- 2018: 0
- 2019: 0
- 2020: 0
- 2021: 0
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 17
-
mistune Cross-site scripting (XSS) vulnerability this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.