Mistune Markdown library can leak local files and allow script injection
A Python tool that turns Markdown into web pages can be tricked into reading files on the server it runs on, and into showing harmful script to visitors. This is only a problem if the Include feature is turned on.
| Severity | HighCVSS 8.7 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yesmistune 3.3.0 · since 25 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker submits MarkdownContent contains ../ include paths
- 2Include directive runsPath is not checked against source directory
- 3Server reads fileArbitrary local files are opened
- 4Unescaped output renderedFile contents and errors inserted as raw HTML
- 5Script runs for visitorXSS even when escape=True
- ResultAttacker reads server files and runs scripts
What happened
Mistune's Include directive does not check that resolved file paths stay inside the source directory, enabling path traversal with ../ sequences. Error messages and included file contents are also rendered without HTML escaping, causing XSS even when escape=True.
Are you affected?
You are affected if you use mistune 3.2.0 or earlier with the Include directive plugin explicitly enabled via the plugins parameter.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| mistune · pip | <= 3.2.0 | 3.3.0 |
What to do
- Update mistune to 3.3.0 or later
- If you cannot update now, remove the Include plugin from the plugins parameter
- Review any user-supplied Markdown handling to make sure untrusted users cannot trigger includes
Timeline
- 22 Oct 2026, 19:17 UTCPublicly disclosed
- 22 Oct 2026, 19:17 UTCReported by NVD · NVD
- 23 Oct 2026, 20:46 UTCReported by GitHub Advisory · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- NVD22 Oct 2026, 19:17 UTC
- GitHub Advisory23 Oct 2026, 20:46 UTC
Technical details
- ID
- CVE-2026-115355 · GHSA-h7ww-273w-6cm8
- CVSS
- 8.7 / 10
- EPSS
- 0.5% chance of exploitation within 30 days
- Disclosed
- 22 Oct 2026, 19:17 UTC
- On Zero Radar
- before the radar started
- Last change
- 25 Oct 2026, 13:32 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works