CVE-2026-115355: Mistune before 3.3.0 Path Traversal and XSS via Include Directive

Published Oct 22, 2026
·
Updated

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.

Other sources

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) - blockerror() in html.py (line 140) - renderhtmlinclude() (line 72)

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

— GitHub

Affected Software

13 affected componentsFixes available
pypi/mistune<3.3.0
pip/mistune<=3.2.0
3.3.0
ubuntu/mistune*
ubuntu/mistune*
ubuntu/mistune*
ubuntu/mistune*
ubuntu/mistune*
ubuntu/mistune*
ubuntu/mistune*
debian/mistune<=2.0.4-1, <=3.1.3-1, <=3.1.4-1
3.4.0-1
debian/mistune*
debian/mistune*
debian/mistune*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/mistune to a version that resolves this vulnerability.

    Fixed in 3.3.0
  2. Upgrade

    Upgrade debian/mistune to a version that resolves this vulnerability.

    Fixed in 3.4.0-1
  3. Upgrade

    Upgrade mistune to a version that resolves this vulnerability.

    Fixed in 3.3.0

Event History

Oct 22, 2026
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·07:13 PM
Data Sourced
via MITRE·07:13 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Oct 23, 2026
Advisory Published
via GitHub·08:46 PM
Data Sourced
via GitHub·08:46 PM
DescriptionWeaknessAffected Software
Oct 28, 2026
Data Sourced
via OSV·05:50 PM
Affected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using Mistune before 3.3.0 are affected if they process attacker-controlled Include directive paths or render resulting content where an attacker can influence include errors or included file contents.

2

What does an attacker need to exploit the vulnerability?

An attacker needs the ability to supply an Include path containing ../ sequences to read files outside the intended directory. For cross-site scripting, they need control over content that reaches unescaped include error messages or included file contents.

3

Does enabling escape=True prevent exploitation?

No. The cross-site scripting issue can occur through unescaped error messages and included file contents even when escape=True is enabled.

4

How can I determine whether my application is affected?

Check whether it uses a Mistune version earlier than 3.3.0 and enables or processes Include directives. Review whether untrusted users can influence include paths, included files, or rendered Markdown output.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203