8.7high
Mistune before 3.3.0 Path Traversal and XSS via Include Directive
- Severity
- 8.7high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.46% (higher than 41% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-h7ww-273w-6cm8
Description
Mistune before 3.3.0 contains a path traversal vulnerability in the Include directive that allows attackers to read arbitrary files by supplying ../ sequences in include paths. Attackers can also inject HTML through unescaped error messages and included file contents to perform cross-site scripting even when escape=True is set.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| lepture mistune | before 3.3.0 Not affected: 3.3.0 | CVE List |
| mistune (PyPI) | before 3.3.0 | GitHub Advisory Database |
All scores
| VulnCheck | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Mistune before 3.3.0 contains a path traversal vulnerability in the Include directive that allows attackers to read arbitrary files by supplying ../ sequences in include paths. Attackers can also inject HTML through unescaped error messages and included file contents to perform cross-site scripting even when escape=True is set.
GitHub Advisory Database
The Include directive in src/mistune/directives/include.py does not validate that the resolved file path stays within the source directory, allowing path traversal via ../ sequences to read arbitrary files.
Additionally, error messages and included file contents are rendered without HTML escaping, leading to XSS even when escape=True.
Affected functions:
- Path resolution (lines 27-31)
block_error()in html.py (line 140)render_html_include()(line 72)
The Include plugin must be explicitly enabled via the plugins parameter.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-115355 changed 2026-10-29 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h7ww-273w-6cm8 changed 2026-10-23 | CC-BY-4.0 |
| NVD | CVE-2026-115355 changed 2026-10-29 | Public domain |