CVE-2026-59924

Mistune: Arbitrary File Read via Include directive path traversal

Published Jul 8, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 August 1, 2026 at 15:54 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
Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-22

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 8, 2026, 5:10 PM
Reserved
Jul 7, 2026, 6:20 PM
Status
Analyzed
Published
Jul 8, 2026, 5:17 PM
Modified
Oct 25, 2026, 5:10 PM