CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-r4rv-85jg-w4mf: Mistune: Arbitrary File Read via Include directive path traversal

mediumCVSS 5.9CVE-2026-59924
Summary A path traversal issue exists in mistune's Include directive when markdown files are processed using md.read(). A crafted include path can cause files outside the intended markdown directory to be accessed. Details The issue occurs in the Include.parse() method where user-supplied paths are joined and normalized without verifying that the resulting path remains within an expected directory. relpath = self.parse_title(m) dest = os.path.join(os.path.dirname(source_file), relpath) dest = os.path.normpath(dest) Because the final path is not restricted to a trusted base directory, path traversal sequences such as ../ may reference files outside the intended location. Proof of Concept Create a markdown file: .. include:: ../../../example.txt Process it using: import mistune from mistune.directives import RSTDirective, Include md = mistune.create_markdown( plugins=[RSTDirective([Include()])] ) result, state = md.read("test.md") print(result) Impact Applications that process untrusted markdown files with the Include directive enabled may allow unintended file access. The impact depends on how the feature is used and what files are accessible to the running process. Recommended Fix Validate the resolved path and ensure it remains within an allowed directory before opening the file.

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
medium — CVSS 5.9
Published
2026-07-20
Last updated
2026-07-20
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-r4rv-85jg-w4mf

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-59924coverage & exploitation statusNVD · CVE.org

Same CVEs, other sources

How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.

More from GitHub Security Advisories