Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit Markdown with malicious :class: admonition value
-
DeliveryApplication passes content to Mistune with directives enabled
-
Exploitrender_admonition() concatenates unescaped value into HTML class attribute
-
ExecutionPoisoned HTML served to victim browser
-
PersistInjected JavaScript executes in victim session
-
ImpactSession token or sensitive data exfiltrated
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concurrent conditions: (1) the target application uses Mistune with the directives/admonition plugin active, as the flaw is strictly isolated to |
| Impact | The CVSS 4.0 score of 5.3 (Medium) reflects network-reachable, low-complexity, zero-privilege exploitation requiring passive victim interaction (UI:P). Real-world impact is highly context-dependent: stored XSS scenarios in multi-user platforms (wikis, CMS, documentation tools, code review systems) represent a materially higher priority than single-user or offline rendering contexts where output is never served to other browsers. No CISA KEV listing and no known public exploit are confirmed, suggesting the vulnerability has not yet been actively weaponized at scale. EPSS data was not provided, so exploitation probability cannot be quantified beyond CVSS signal. Impact is bounded to browser-side code execution (VC:L/VI:L, SC:L/SI:L in CVSS 4.0); there is no server-side foothold. The escape-bypass characteristic elevates practical risk beyond the raw score: defenders who audited for escape mode usage would have falsely cleared this attack surface. |
| Exploit ScenarioDerived | An attacker submits a crafted Markdown document to a Mistune-powered wiki or documentation platform containing an admonition block with a malicious |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 08, 2026
Cross-site scripting in Mistune (Python Markdown parser) prior to version 3.2.1 allows injection of arbitrary HTML attributes via the Admonition directive's :class: option, critically bypassing HTMLRenderer escape mode even when it is explicitly enabled. Applications that render user-controlled Markdown with admonition directives and serve the resulting HTML to web browsers are exposed to stored or reflected XSS, enabling session hijacking, credential theft, or malicious DOM manipulation. No public exploit has been identified at time of analysis, and a vendor-released patch is available in v3.2.1.
RemediationAI
Upgrade Mistune to version 3.2.1 or later; this is the vendor-confirmed fix, delivered via commit a3cb6e5655308797e8be021d6c7b5bab13cbace2 and tagged at https://github.com/lepture/mistune/releases/tag/v3.2.1. If an immediate upgrade is not feasible, the primary workaround is to disable or filter out the Admonition directive from user-controlled Markdown input before passing it to Mistune - this eliminates the vulnerable code path but removes admonition rendering entirely. As a narrower alternative, strip or whitelist the :class: option within admonition blocks at the application layer prior to rendering. Deploying a strict Content Security Policy header (default-src 'self'; script-src 'self') in the serving application can limit the damage from any injected JavaScript but does not remediate the underlying injection - treat it as defense-in-depth, not a substitute for patching. The vendor advisory URL is https://github.com/lepture/mistune/security/advisories/GHSA-g97x-gvcm-x72h.
Affected VersionsENISA
Affected Packages
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 is a lightweight Python Markdown parsing library by lepture (CPE: cpe:2.3:a:lepture:mistune:*:*:*:*:*:*:*:*) that includes an extensible directives system. The vulnerable component is render_admonition() in src/mistune/directives/admonition.py, which processes admonition-style blocks (e.g., .. warning::) and their optional :class: metadata. The function directly concatenates the :class: value into an HTML class attribute string without applying HTML attribute-context escaping, satisfying CWE-79 (Improper Neutralization of Input During Web Page Generation). The especially significant aspect of this flaw is that it operates at the directive rendering layer, entirely bypassing the HTMLRenderer's escape mode - developers who relied on that setting as a security control were unknowingly exposed. As a library-level vulnerability, any application embedding Mistune that renders attacker-influenced Markdown with admonition directives inherits the issue.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Network-delivered XSS requiring victim page-load (UI:R, PR:N); scope changes to browser context (S:C); no confidentiality or integrity impact beyond browser session.
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, render_admonition() in src/mistune/directives/admonition.py concatenates the Admonition directive :class: option into the HTML class attribute without escaping, allowing attribute injection and cross-site scripting even when HTMLRenderer escape mode is enabled. This issue is fixed in version 3.2.1.
Blast Radius
ecosystem impact- 1 pypi packages depend on mistune (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.3.0.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Uncontrolled CPU consumption in Mistune, a Python Markdown parser, allows remote unauthenticated attackers to cause deni
Denial of service in Mistune (the lepture Python Markdown parser) before 3.3.0 lets remote unauthenticated attackers exh
Denial of service in Mistune, a Python Markdown parser, affects all versions prior to 3.3.0 when the strikethrough, mark
Denial of service in Mistune, a widely used pure-Python Markdown parser, affects all versions prior to 3.3.0 where the d
Cross-site scripting in Mistune Python Markdown parser (all versions before 3.3.0) allows attacker-controlled Markdown c
Cross-site scripting in Mistune prior to 3.3.0 stems from an incomplete URI scheme blocklist in the `safe_url` filter, p
mistune.py in Mistune 0.7.4 allows XSS via an unexpected newline (such as in java\nscript:) or a crafted email address,
Path traversal in Mistune's Include plugin allows reading arbitrary files from the server filesystem when processing att
Unbounded recursion in Mistune's Include directive (all versions prior to 3.3.0) can be triggered by a pair of mutually-
Quadratic denial of service in Mistune's Markdown parser (parse_link_text) affects versions 3.2.0, 3.2.1 and main prior
Denial of service in Mistune 3.3.0 through 3.3.3 allows unauthenticated remote attackers to exhaust CPU and stall reques
Predictable heading anchor ID generation in Mistune's toc plugin (all versions prior to 3.3.0) enables same-page navigat
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor 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 |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Not-Affected |
| SUSE Manager Proxy 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server 4.3 | Not-Affected |
| SUSE Manager Server 4.3 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Not-Affected |
| openSUSE Leap 15.3 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-42334
GHSA-g97x-gvcm-x72h
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB