All vulnerabilities
CVE-2026-115355GHSA-h7ww-273w-6cm8

Mistune: Path Traversal and XSS in Include directive

lepture mistunepipLibraries & packages
CVSS
8.7High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.39%Chance of exploitation activity in the next 30 days, higher than 31% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in3.3.0Fixed versionGitHub
Published22 Oct 2026Updated 23 Oct 2026CVE List

What fixes it

  • 3.3.0mistune, pipGitHub
  • 3.3.0mistuneCVE List
  • 3.3.0mistune, PyPIOSVpip install "mistune>=3.3.0"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

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.

Text from GitHub Advisory Database

Affected versions 54

  • mistune, pip<= 3.2.0GitHub
  • mistuneaffected: all versions before 3.3.0CVE List
  • mistuneunaffected: 3.3.0CVE List
  • mistune, PyPIfrom first release, fixed in 3.3.0OSV
  • mistune, PyPI0.1.0OSV
  • mistune, PyPI0.2.0OSV
  • mistune, PyPI0.3.0OSV
  • mistune, PyPI0.3.1OSV
  • mistune, PyPI0.4OSV
  • mistune, PyPI0.4.1OSV
  • mistune, PyPI0.5OSV
  • mistune, PyPI0.5.1OSV
  • mistune, PyPI0.6OSV
  • mistune, PyPI0.7OSV
  • mistune, PyPI0.7.1OSV
  • mistune, PyPI0.7.2OSV
  • mistune, PyPI0.7.3OSV
  • mistune, PyPI0.7.4OSV
  • mistune, PyPI0.8OSV
  • mistune, PyPI0.8.1OSV
  • mistune, PyPI0.8.2OSV
  • mistune, PyPI0.8.3OSV
  • mistune, PyPI0.8.4OSV
  • mistune, PyPI2.0.0OSV
  • mistune, PyPI2.0.0a1OSV
  • mistune, PyPI2.0.0a2OSV
  • mistune, PyPI2.0.0a3OSV
  • mistune, PyPI2.0.0a4OSV
  • mistune, PyPI2.0.0a5OSV
  • mistune, PyPI2.0.0a6OSV
  • mistune, PyPI2.0.0rc1OSV
  • mistune, PyPI2.0.1OSV
  • mistune, PyPI2.0.2OSV
  • mistune, PyPI2.0.3OSV
  • mistune, PyPI2.0.4OSV
  • mistune, PyPI2.0.5OSV
  • mistune, PyPI2.1.0OSV
  • mistune, PyPI3.0.0OSV
  • mistune, PyPI3.0.0a1OSV
  • mistune, PyPI3.0.0a2OSV
  • mistune, PyPI3.0.0a3OSV
  • mistune, PyPI3.0.0rc1OSV
  • mistune, PyPI3.0.0rc2OSV
  • mistune, PyPI3.0.0rc3OSV
  • mistune, PyPI3.0.0rc4OSV
  • mistune, PyPI3.0.0rc5OSV
  • mistune, PyPI3.0.1OSV
  • mistune, PyPI3.0.2OSV
  • mistune, PyPI3.1.0OSV
  • mistune, PyPI3.1.1OSV
  • mistune, PyPI3.1.2OSV
  • mistune, PyPI3.1.3OSV
  • mistune, PyPI3.1.4OSV
  • mistune, PyPI3.2.0OSV

References 6