Skip to main content

Mistune EUVDEUVD-2026-42339

| CVE-2026-59927 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-07-08 GitHub_M GHSA-8mpj-m6qm-5qr8 PYSEC-2026-2215
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker gains write access to markdown content store
  2. Delivery
    Creates file A including file B and file B including file A
  3. Exploit
    Triggers rendering of either file via application request
  4. Install
    Mistune Include directive recurses without cycle guard
  5. C2
    Python call stack exhausted
  6. Execute
    RecursionError raised
  7. Impact
    Rendering request crashes

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

The Include directive (src/mistune/directives/include.py) must be explicitly enabled and active in the target application - it is an optional Mistune feature, not enabled in all deployments. The attacker must be able to create or influence two distinct markdown files on the server's filesystem such that each references the other via Include syntax; this typically requires write access to the application's content store (e.g., wiki page creation, file upload capability), making PR:N in the vendor CVSS potentially optimistic for hardened deployments. Applications where the Include directive is disabled, where markdown content is entirely author-controlled (no user submissions), or where file-creation is restricted to privileged users are not practically exploitable. The scope is limited to availability (A:L) - no confidentiality or integrity impact applies. Python's built-in recursion limit bounds the damage to a single request crash rather than process or host compromise.

Impact

The vendor-assigned CVSS 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) characterizes this as a low-complexity, unauthenticated network attack with limited availability impact. The PR:N and AV:N assignments may overstate ease of exploitation: the Include directive operates on server-side filesystem files, meaning an attacker typically must be able to write or influence two separate markdown files in the target application before a cycle can be triggered - suggesting PR:L and AC:H are more realistic in most deployments. No EPSS score was provided in the input; given the absence from CISA KEV and no reported POC code, real-world exploitation probability appears low. The practical blast radius is a single crashed rendering request rather than full service compromise, consistent with the A:L rating. Applications that expose the Include directive to unauthenticated user-supplied content (e.g., public wikis or documentation platforms) carry higher risk than those where markdown is author-controlled. Overall this is a genuine but low-urgency issue warranting a planned patch cycle rather than emergency response.

Exploit ScenarioDerived

An attacker with the ability to create or upload markdown content to a Mistune-powered application constructs two files where file A contains an include reference to file B and file B contains an include reference back to file A. When any user or automated process triggers a render of either file, Mistune's Include directive recursively processes the chain without bound, exhausting the Python interpreter's call stack and raising a RecursionError that crashes the rendering request. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 08, 2026

Unbounded recursion in Mistune's Include directive (all versions prior to 3.3.0) can be triggered by a pair of mutually-referencing markdown files, bypassing the cycle detector that only checks for direct self-inclusion. An attacker who can supply markdown content processed by an application using the Include directive may crash the rendering request with a Python RecursionError, resulting in a denial of service. No public exploit has been identified at time of analysis and the vulnerability is not listed in CISA KEV; a confirmed fix is available in version 3.3.0.

RemediationAI

Upgrade Mistune to version 3.3.0, which introduces indirect cycle detection for the Include directive. The fix is confirmed in the official release at https://github.com/lepture/mistune/releases/tag/v3.3.0 and the underlying code change is visible at https://github.com/lepture/mistune/commit/1bef343ade163fc3bb95572b15be720084cdb993. If an immediate upgrade is not possible, disable the Include directive feature in the application's Mistune configuration to eliminate the vulnerable code path entirely - this is the most effective workaround with no security trade-off, though it removes include functionality. Alternatively, restrict the markdown rendering endpoint to authenticated or trusted users to reduce the attacker-controlled input surface; this reduces risk but does not eliminate the flaw for insider or compromised-account scenarios. Content validation to block or sanitize include directives before they reach Mistune is also a viable compensating control but requires careful implementation to avoid bypass.

Affected VersionsENISA

mistune < 3.3.0

Affected Packages

pypi mistune fix: 3.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Mistune (CPE: cpe:2.3:a:lepture:mistune:*:*:*:*:*:*:*:*) is a Python Markdown parser that supports an optional Include directive implemented in src/mistune/directives/include.py, which reads and inlines external markdown files at render time. The root cause is CWE-674 (Uncontrolled Recursion): the guard logic only detects a file directly naming itself as an include target and does not maintain a call-stack or visited-file set across the full inclusion chain. When file A includes file B and file B includes file A, the directive handler recurses without bound until Python's default recursion limit is hit, raising an uncaught RecursionError that aborts the rendering request. The flaw is entirely within the parser library and is independent of the underlying markdown content format.

Know when Mistune gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 3.1 LOW

Triggering the cycle requires writing two mutually-referencing files to the server, implying PR:L and AC:H rather than vendor's PR:N/AC:L.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.3 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Jul 08, 2026 - 18:02 EUVD

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on mistune (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.3.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Medium
popular Python markdown parser, common in Python web and docs tooling
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2026-49851 HIGH POC
8.7 Jun 24

Uncontrolled CPU consumption in Mistune, a Python Markdown parser, allows remote unauthenticated attackers to cause deni

CVE-2026-59928 HIGH POC
7.5 Jul 08

Denial of service in Mistune (the lepture Python Markdown parser) before 3.3.0 lets remote unauthenticated attackers exh

CVE-2026-59922 HIGH POC
7.5 Jul 08

Denial of service in Mistune, a Python Markdown parser, affects all versions prior to 3.3.0 when the strikethrough, mark

CVE-2026-59925 HIGH POC
7.5 Jul 08

Denial of service in Mistune, a widely used pure-Python Markdown parser, affects all versions prior to 3.3.0 where the d

CVE-2026-59923 MEDIUM POC
6.1 Jul 08

Cross-site scripting in Mistune Python Markdown parser (all versions before 3.3.0) allows attacker-controlled Markdown c

CVE-2026-59929 MEDIUM POC
6.1 Jul 08

Cross-site scripting in Mistune prior to 3.3.0 stems from an incomplete URI scheme blocklist in the `safe_url` filter, p

CVE-2017-15612 MEDIUM POC
6.1 Oct 19

mistune.py in Mistune 0.7.4 allows XSS via an unexpected newline (such as in java\nscript:) or a crafted email address,

CVE-2026-59924 MEDIUM POC
5.9 Jul 08

Path traversal in Mistune's Include plugin allows reading arbitrary files from the server filesystem when processing att

CVE-2026-115347 HIGH
8.7 Oct 22

Quadratic denial of service in Mistune's Markdown parser (parse_link_text) affects versions 3.2.0, 3.2.1 and main prior

CVE-2026-121437 HIGH
8.7 Nov 03

Denial of service in Mistune 3.3.0 through 3.3.3 allows unauthenticated remote attackers to exhaust CPU and stall reques

CVE-2026-59930 MEDIUM POC
4.3 Jul 08

Predictable heading anchor ID generation in Mistune's toc plugin (all versions prior to 3.3.0) enables same-page navigat

CVE-2022-34749 HIGH
7.5 Jul 25

In mistune through 2.0.2, support of inline markup is implemented by using regular expressions that can involve a high a

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.0 SUSE Linux Enterprise Server for SAP applications 16.0 Fixed
openSUSE Leap 16.0 Fixed
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Package Hub 15 SP7 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy