mistune
Affected
- introduced
0, fixed3.3.0(ecosystem)
Fixed versions
3.3.0
Fix
- Fixed version
3.3.0pip install --upgrade mistune==3.3.0
Advisory
Also known as: CVE-2026-115355
Mistune: Path Traversal and XSS in Include directive
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:
block_error() in html.py (line 140)render_html_include() (line 72)The Include plugin must be explicitly enabled via the plugins parameter.
High Basis: The source's own band: HIGH
0, fixed 3.3.0 (ecosystem)3.3.0
3.3.0pip install --upgrade mistune==3.3.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0