---
id: "CVE-2026-115354"
kind: "vulnerability"
aliases: ["CVE-2026-115354"]
title: "Mistune: Include directive path traversal reads local files from Markdown"
severity: "high"
cvss: 7.1
epss: 0.00333
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["markdown-rendering", "mistune", "package", "python", "self-hosted"]
not_affected_if: ["default-config", "trusted-input-only"]
published_at: "2026-10-22T19:17:41+00:00"
first_seen_at: "2026-10-23T21:57:31+00:00"
updated_at: "2026-10-25T03:31:30+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115354", "first_seen_at": "2026-10-23T21:57:31+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-115354", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Mistune: Include directive path traversal reads local files from Markdown

Mistune before 3.3.0 has a path traversal flaw in its opt-in Include directive that lets relative or absolute include paths reach local files. An attacker who submits Markdown rendered through Markdown.read() can read files such as /etc/passwd and inject unescaped HTML or script into the output.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `pip show mistune` or `python -c "import mistune; print(mistune.__version__)"`
- Search your code for the Include directive being enabled, for example `include` plugin or directive registration in Mistune setup
- Search your code for `Markdown.read(` calls that render user-submitted Markdown

## Fix

- Upgrade mistune to `3.3.0` or later with `pip install --upgrade "mistune>=3.3.0"`
- Leave the Include directive disabled for untrusted input until upgraded

## Timeline

- 2026-10-23T21:57:31+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115354
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-115354

## From the sources

Mistune before 3.3.0 contains a path traversal vulnerability in the opt-in Include directive that allows attackers to read local files by supplying relative or absolute include paths. Attackers who submit Markdown rendered via Markdown.read() can disclose files such as /etc/passwd and inject unescaped HTML or script content into rendered output.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
