Description
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.
Published: 2026-10-22
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Stored cross‑site scripting via Include directive
Action: Patch
AI Analysis

Impact

Mistune versions before 3.3.0 contain an XSS flaw that processes the Include directive to insert the contents of .html, .xhtml, or .htm files as raw block_html tokens without escaping when escape=False is provided. Attackers who can place an HTML file that the renderer can read and reference with the Include directive, possibly manipulating the path, can embed JavaScript that will be executed in the browsers of any users who render the markdown. The vulnerability enables only client‑side code execution and does not provide direct access to server resources.

Affected Systems

The vulnerability affects the Mistune markdown engine from the Mistune project, all releases older than 3.3.0. The issue manifests when the Include directive processes included HTML files as raw output rather than escaping special characters.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity. The EPSS score is not available and the flaw is not included in CISA’s KEV catalog, implying limited evidence of widespread exploitation. Exploitation requires the attacker to introduce a writable HTML file that the renderer can include and to invoke the Include directive with escape=False, which may be achieved through a file upload feature or path traversal vulnerability. Once triggered, the stored script is executed in every user’s browser that renders the affected markdown.

Generated by OpenCVE AI on October 23, 2026 at 04:35 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or newer, which sanitizes included HTML output
  • If upgrading is not possible, configure the application to always use escape=True or disable the Include directive to prevent raw HTML inclusion
  • Restrict write access to directories that contain HTML files used by the renderer so that attackers cannot create or modify files that the Include directive can reference

Generated by OpenCVE AI on October 23, 2026 at 04:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Mistune before 3.3.0 Stored XSS via Include Directive HTML Files
First Time appeared Mistune Project
Mistune Project mistune
Weaknesses CWE-79
CPEs cpe:2.3:a:mistune_project:mistune:*:*:*:*:*:*:*:*
Vendors & Products Mistune Project
Mistune Project mistune
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Mistune Project Mistune
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-22T19:13:26.891Z

Reserved: 2026-10-22T11:20:02.626Z

Link: CVE-2026-115350

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-22T19:17:40.767

Modified: 2026-10-22T19:17:40.880

Link: CVE-2026-115350

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-22T19:13:26Z

Links: CVE-2026-115350 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T07:15:17Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')