CVE-2026-115355
JSON

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 packageVersionsReported by
lepture mistunebefore 3.3.0
Not affected: 3.3.0
CVE List
mistune (PyPI)before 3.3.0GitHub Advisory Database

All scores

VulnCheck8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
VulnCheck7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHubhigh rating

Classification

CWE-22

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

SourceRecordLicence
CVE ListCVE-2026-115355 changed 2026-10-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-h7ww-273w-6cm8 changed 2026-10-23CC-BY-4.0
NVDCVE-2026-115355 changed 2026-10-29Public domain