# CVE-2026-59924: lepture Mistune path traversal in Include directive

Source: https://junglewise.ai/threats/cve-2026-59924-lepture-mistune-path-traversal-in-include-directive  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-20  
License: CC BY 4.0 with a link back

CVE-2026-59924 · Severity: medium · CVSS 5.9 · Published 2026-07-08

Mistune, a popular Python library for parsing Markdown, contains a vulnerability in its 'Include' directive. If an application uses this library to process Markdown files from untrusted sources, an attacker could potentially read sensitive files from the server's local storage. This could lead to the exposure of configuration files, credentials, or other private data.

Technologies: [mistune (PyPI)](https://junglewise.ai/threats/technologies/mistune). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-59924 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59924 being exploited in the wild.

**How severe is CVE-2026-59924?** Medium severity, with a CVSS score of 5.9, published 8 July 2026.

**Which products and versions are affected?** mistune (PyPI) < 3.3.0, ECOSYSTEM:introduced=0,fixed=3.3.0.

**Is there a fix for CVE-2026-59924?** Yes. mistune (PyPI): upgrade to 3.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59924 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59924?** Check whether you run mistune (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mistune (PyPI): upgrade to 3.3.0 or later

  ```sh
  pip install "mistune>=3.3.0"
  ```


## Technical details

A path traversal vulnerability exists in the `Include.parse()` method of the Mistune library. The root cause is the lack of validation when joining and normalizing user-supplied paths in the `Include` directive, allowing the use of `../` sequences to escape the intended directory. An attacker can exploit this by providing a crafted Markdown file that includes local system files. This vulnerability is reachable if the `RSTDirective` with `Include` is enabled and the application processes untrusted Markdown via `md.read()`. The issue is fixed in version 3.3.0.

## Affected products

- lepture mistune < 3.3.0

## Identifiers

- CVE-2026-59924
- GHSA-r4rv-85jg-w4mf
- PYSEC-2026-2212

## Timeline

- 2026-06-21: disclosed: Initial disclosure by reporter 0x5t4l1n
- 2026-07-08: advisory: NVD publication date
- 2026-07-20: advisory: GitHub Advisory Database publication date
- 2026-07-20: patched: Version 3.3.0 released

## References

- [https://api.github.com/users/0x5t4l1n](https://api.github.com/users/0x5t4l1n)
- [https://github.com/0x5t4l1n](https://github.com/0x5t4l1n)
- [https://api.github.com/users/0x5t4l1n/gists%7B/gist_id%7D](https://api.github.com/users/0x5t4l1n/gists%7B/gist_id%7D)
- [https://api.github.com/users/0x5t4l1n/repos](https://api.github.com/users/0x5t4l1n/repos)
- [https://avatars.githubusercontent.com/u/161853795?v=4](https://avatars.githubusercontent.com/u/161853795?v=4)
- [https://api.github.com/users/0x5t4l1n/events%7B/privacy%7D](https://api.github.com/users/0x5t4l1n/events%7B/privacy%7D)

## Related threats

- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/duplicate-advisory-mistune-path-traversal-and-xss-in-include-directive-bf25c187)
- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/cve-2026-115355-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune uncontrolled recursion in HTML rendering](https://junglewise.ai/threats/cve-2026-76098-mistune-uncontrolled-recursion-in-html-rendering)
- [lepture Mistune predictable ID generation in TOC plugin](https://junglewise.ai/threats/cve-2026-59930-lepture-mistune-predictable-id-generation-in-toc-plugin)
- [lepture mistune XSS via incomplete URL scheme filtering in HTML renderer](https://junglewise.ai/threats/cve-2026-59929-lepture-mistune-xss-via-incomplete-url-scheme-filtering-in-html)
