high

CVE-2026-115355

PyPI · mistune

Summary

Mistune: Path Traversal and XSS in Include directive

Severity
high
EPSS
0.5% (p40)
CWE
CWE-22
Also known as
GHSA-h7ww-273w-6cm8
Published
2026-10-23
Updated
2026-10-23

Advisory details

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:

The Include plugin must be explicitly enabled via the plugins parameter.

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.