home / blog

2026-11-22 · medium

CVE-2026-59924: Path Traversal in Mistune

Path traversal vulnerability in Mistune allows reading files outside markdown directory

CVE-2026-59924: Path Traversal in Mistune

CVE-2026-59924 identifies a path traversal vulnerability in Mistune, a Python Markdown parser. The flaw occurs in the Include.parse() function, which joins and normalizes user-supplied include paths without verifying that the result remains within the intended markdown directory. This allows crafted include paths to access files outside that directory when markdown files are processed using md.read().

The vulnerability is classified as medium (CVSS 5.9) and affects all versions of Mistune prior to 3.3.0. A verified Proof of Concept (PoC) has been confirmed, published on GitHub on November 22, 2026, demonstrating the practical exploitability of the vulnerability. The NVD officially cataloged the flaw on July 7, 2026.

For defense, it is recommended to update Mistune to version 3.3.0 or later to apply the fix. For systems that cannot be immediately updated, mitigations such as strict validation of include paths before processing or restrictions to files accessible through include directives can be implemented. Monitoring for anomalies in file access may help detect exploitation attempts.

At a glance

What
Path traversal vulnerability in Mistune's Include.parse()
Severity
medium (CVSS 5.9)
Affected versions
Versions prior to 3.3.0
Fix
Update to version 3.3.0
Status
Vulnerability fixed
Action
Update Mistune to version 3.3.0 or later

Sources: NVD, CVE-2026-59924

← All articles