Description
Mistune before 3.3.0 contains a path traversal vulnerability in the Include directive that allows attackers to read arbitrary files by supplying ../ sequences in include paths. Attackers can also inject HTML through unescaped error messages and included file contents to perform cross-site scripting even when escape=True is set.
Published: 2026-10-22
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary File Read and XSS
Action: Immediate Patch
AI Analysis

Impact

The vulnerability allows an attacker to supply a markdown Include directive with a specially crafted path that contains .. sequences. The parser resolves the path on the file system without sufficient validation, enabling arbitrary file read. Additionally, any included file content is inserted into the rendered output without escaping, exposing an unchecked XSS vector even when escape=True is activated. Attackers can thus read sensitive server files and inject malicious scripts into user views.

Affected Systems

The flaw applies to all versions of Mistune prior to 3.3.0. The vendor is lepture, and the library is publicly distributed under that name. No specific non‑patched minor releases are identified; all versions earlier than 3.3.0 contain the issue.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV. Because mistune is commonly used in web applications to render markdown from user data, the likely attack vector is a remote web attacker supplying malicious markdown content. If the application accepts untrusted markdown, the attacker can read arbitrary files on the server and perform XSS against other users. Local attacks would also be possible if an attacker can influence the Include directive via local files.

Generated by OpenCVE AI on October 23, 2026 at 03:36 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or later.
  • If upgrading is not possible, disable the Include directive or restrict it to a safe directory and validate any supplied paths against traversal sequences.
  • Suppress or sanitize detailed error messages to prevent leaking file contents when include errors occur.
  • Ensure all output, including file contents included through the directive, is properly escaped before rendering.

Generated by OpenCVE AI on October 23, 2026 at 03:36 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

Important


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

Type Values Removed Values Added
Description Mistune before 3.3.0 contains a path traversal vulnerability in the Include directive that allows attackers to read arbitrary files by supplying ../ sequences in include paths. Attackers can also inject HTML through unescaped error messages and included file contents to perform cross-site scripting even when escape=True is set.
Title Mistune before 3.3.0 Path Traversal and XSS via Include Directive
First Time appeared Mistune Project
Mistune Project mistune
Weaknesses CWE-22
CPEs cpe:2.3:a:mistune_project:mistune:*:*:*:*:*:*:*:*
Vendors & Products Mistune Project
Mistune Project mistune
References
Metrics cvssV3_1

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

cvssV4_0

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


Subscriptions

Mistune Project Mistune
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

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

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

Link: CVE-2026-115355

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-115355

cve-icon Redhat

Severity : Important

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

Links: CVE-2026-115355 - Bugzilla

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')