# CVE-2026-115353: Mistune path traversal in RST include directive

Source: https://junglewise.ai/threats/cve-2026-115353-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-22. Updated: 2026-10-22  
License: CC BY 4.0 with a link back

CVE-2026-115353 · Severity: high · CVSS 8.6 · Published 2026-10-22

Mistune is a markdown renderer used by applications to convert user-supplied or internal markdown documents into HTML. The include directive in its RST plugin allows attackers to read arbitrary files from the server by embedding path traversal sequences (../ or absolute paths) in markdown, exposing sensitive files like credentials, environment variables, or application data. This affects any application that renders untrusted markdown with the Include plugin enabled.

Technologies: [Lepture Mistune](https://junglewise.ai/threats/technologies/lepture-mistune). Vendors: [Lepture](https://junglewise.ai/threats/vendors/lepture).

## Quick answers

**Is CVE-2026-115353 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-115353 being exploited in the wild.

**How severe is CVE-2026-115353?** High severity, with a CVSS score of 8.6, published 22 October 2026.

**Which products and versions are affected?** Lepture Mistune before 3.3.0.

**Is there a fix for CVE-2026-115353?** Yes: fixed in 3.3.0. Until then: Disable the Include directive plugin if not required, or restrict markdown rendering to trusted sources only. Applications should avoid setting state.env['__file__'] or limit it to a restricted base directory that contains only safe files to be included. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-115353 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-115353?** Check whether you run Lepture Mistune at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.3.0

Disable the Include directive plugin if not required, or restrict markdown rendering to trusted sources only. Applications should avoid setting state.env['__file__'] or limit it to a restricted base directory that contains only safe files to be included.

## Technical details

The vulnerability is a path traversal flaw in src/mistune/directives/include.py where the include directive accepts unconstrained relative and absolute file paths from markdown source without validating that the resolved path remains within an intended base directory. The vulnerable code uses os.path.normpath and os.path.join but fails to enforce path containment; os.path.join discards prior path components when given an absolute path, and relative traversal sequences like ../ are normalized but not prevented. An attacker can read any file accessible to the rendering process by submitting markdown like `.. include:: /etc/passwd` or `.. include:: ../../../sensitive/file`, causing the plugin to embed file contents in the rendered HTML output.

## Affected products

- lepture mistune before 3.3.0

## Timeline

- 2026-06-21: disclosed
- 2026-10-22: advisory

## References

- [https://github.com/lepture/mistune/security/advisories/GHSA-9jjx-3hq3-hx4j](https://github.com/lepture/mistune/security/advisories/GHSA-9jjx-3hq3-hx4j)
- [https://www.vulncheck.com/advisories/mistune-before-3.3.0-path-traversal-via-include-directive](https://www.vulncheck.com/advisories/mistune-before-3.3.0-path-traversal-via-include-directive)

## Related threats

- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/duplicate-advisory-mistune-path-traversal-and-xss-in-include-directive-bf25c187)
- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/cve-2026-115355-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune path traversal in Include directive](https://junglewise.ai/threats/cve-2026-115354-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune algorithmic complexity DoS in inline link parser](https://junglewise.ai/threats/cve-2026-115352-mistune-before-3-3-0-contains-an-algorithmic-complexity)
- [Mistune CSS injection in figure directive](https://junglewise.ai/threats/cve-2026-115351-mistune-from-3-2-1-before-3-3-0-contains-a-css-injection)
