Description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, Include.parse() joins and normalizes user-supplied include paths without verifying that the result remains within the intended markdown directory, allowing crafted include paths to access files outside that directory when markdown files are processed using md.read(). This issue is fixed in version 3.3.0.
Published: 2026-07-08
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Mistune Markdown parser allows an attacker to supply an Include directive containing a crafted file path that escapes the intended markdown directory. The parser expands and normalizes the path without checking that the resolved file remains within the base directory, enabling arbitrary file reads when a Markdown file is processed with md.read(). This path‑traversal flaw (CWE‑22) permits reading of any file that the process can reach, compromising confidentiality.

Affected Systems

Mistune, maintained by lepture, is impacted in all releases before 3.3.0. The fix is in version 3.3.0, so systems running earlier Mistune versions that employ the Include plugin or call Parse while processing untrusted Markdown files are at risk.

Risk and Exploitability

The CVSS score of 5.9 indicates moderate severity, while the EPSS score of less than 1% suggests a low probability of exploitation at present, and the vulnerability is not listed in the CISA KEV catalog. The likely attack path requires an attacker to supply a malicious Markdown file or otherwise influence an application that processes untrusted input with the Include plugin; if successful, the attacker can read any file accessible to the application process, potentially exposing sensitive configuration data or secrets. This risk is significant for services that accept Markdown from untrusted sources.

Generated by OpenCVE AI on July 26, 2026 at 17:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or newer.
  • Disable the Include plugin or remove any usage of Include.parse in Markdown processing workflows.
  • Configure your application to validate Include paths, ensuring they remain within the intended markdown directory before processing.

Generated by OpenCVE AI on July 26, 2026 at 17:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r4rv-85jg-w4mf Mistune: Arbitrary File Read via Include directive path traversal
History

Wed, 08 Jul 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune

Wed, 08 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 17:00:00 +0000

Type Values Removed Values Added
Description Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, Include.parse() joins and normalizes user-supplied include paths without verifying that the result remains within the intended markdown directory, allowing crafted include paths to access files outside that directory when markdown files are processed using md.read(). This issue is fixed in version 3.3.0.
Title Mistune: Arbitrary File Read via Include directive path traversal
Weaknesses CWE-22
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-08T17:10:47.834Z

Reserved: 2026-07-07T18:20:06.125Z

Link: CVE-2026-59924

cve-icon Vulnrichment

Updated: 2026-07-08T17:10:05.000Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:30:17Z

Weaknesses
  • CWE-22

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