---
id: "CVE-2026-115350"
kind: "vulnerability"
aliases: ["CVE-2026-115350"]
title: "Mistune: Include directive emits raw HTML files, enabling cross-site scripting"
severity: "medium"
cvss: 6.1
epss: 0.00188
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["markdown", "mistune", "package", "python"]
not_affected_if: ["escape-enabled", "no-include-directive", "version-3.3.0-or-later"]
published_at: "2026-10-22T19:17:40+00:00"
first_seen_at: "2026-10-23T21:57:31+00:00"
updated_at: "2026-10-25T04:02:10+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115350", "first_seen_at": "2026-10-23T21:57:31+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-115350", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Mistune: Include directive emits raw HTML files, enabling cross-site scripting

Mistune, a Python Markdown parser, versions before 3.3.0 pass the content of included .html, .xhtml or .htm files through as raw HTML without escaping. An attacker who can place such a file where the renderer can read it, and reach it through path traversal in an include directive, can get scripts to run in a visitor's browser.

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

## How to check

- Check the installed Mistune version with `pip show mistune` or `python -c "import mistune; print(mistune.__version__)"`
- Look for the Include directive in use and for `escape=False` in the renderer configuration

## Fix

- Upgrade mistune to `3.3.0` or later
- Until upgraded, keep `escape=True` or do not use the Include directive on untrusted paths

## Timeline

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

## From the sources

Mistune before 3.3.0 contains a cross-site scripting vulnerability in the Include directive that emits included .html, .xhtml, or .htm file content as raw block_html tokens. Attackers who can plant an HTML file readable by the renderer can reference it via an include directive, combined with path traversal, to execute stored scripts when escape=False is set.

---

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