CVE-2026-59927

Mistune directives/include: mutual `.. include::` recursion crashes the renderer with `RecursionError`, denial of service via two attacker-controlled markdown files

State
Published
Severity
5.3 Medium
Published
Jul 8, 2026
Updated
Jul 8, 2026
Reserved
Jul 7, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.15.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LGitHub_M

Weaknesses

  • CWE-674 Uncontrolled Recursion
  • CWE-755 Improper Handling of Exceptional Conditions

Affected Products

ProductVersions
mistunelepture
  • < 3.3.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.