---
id: CVE-2026-59927
aliases:
  - PYSEC-2026-2215
  - GHSA-8mpj-m6qm-5qr8
title: >-
  Mistune is a Python Markdown parser with renderers and plugins. Prior to
  3.3.0, the Include directive in src/mistune/directives/include.p…
summary: >-
  Mistune is a Python Markdown parser with renderers and plugins. Prior to
  3.3.0, the Include directive in src/mistune/directives/include.py detects only
  direct self-includes and not indirect cycles, allowing two markdown files that
  includ…
severity: medium
cvss: 5.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'
vendor: mistune
product: mistune
ecosystem: pip
affected:
  - mistune < 3.3.0
patched:
  - mistune 3.3.0
published: '2026-07-08'
updated: '2026-07-13'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/PYSEC-2026-2215'
references:
  - url: 'https://github.com/lepture/mistune/releases/tag/v3.3.0'
  - url: >-
      https://github.com/lepture/mistune/commit/1bef343ade163fc3bb95572b15be720084cdb993
  - url: 'https://github.com/lepture/mistune/security/advisories/GHSA-8mpj-m6qm-5qr8'
tags:
  - osv
  - pip
epss: 0.00529
epssPercentile: 0.42255
ingestedAt: '2026-07-13T18:58:08.201Z'
---

## Overview

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, the Include directive in src/mistune/directives/include.py detects only direct self-includes and not indirect cycles, allowing two markdown files that include each other to trigger unbounded recursion, raise RecursionError, and crash the rendering request. This issue is fixed in version 3.3.0.

## Affected packages

- `mistune < 3.3.0`

## Remediation

Upgrade to a patched release:

- `mistune 3.3.0`
