Skip to main content

Mistune EUVDEUVD-2026-42334

| CVE-2026-59926 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-08 GitHub_M GHSA-g97x-gvcm-x72h PYSEC-2026-2214
5.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Submit Markdown with malicious :class: admonition value
  2. Delivery
    Application passes content to Mistune with directives enabled
  3. Exploit
    render_admonition() concatenates unescaped value into HTML class attribute
  4. Execution
    Poisoned HTML served to victim browser
  5. Persist
    Injected JavaScript executes in victim session
  6. Impact
    Session 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 render_admonition() in src/mistune/directives/admonition.py - applications not using admonition directives are not affected; (2) attacker-controlled input can supply Markdown admonition blocks containing a :class: option; and (3) the rendered HTML output is served to and viewed in a web browser by another user (stored XSS) or reflected back to the submitter (reflected XSS). Exploitation is limited by the mandatory user interaction requirement - a victim must load or interact with the rendered page (UI:P in CVSS 4.0). Applications that render Markdown exclusively server-side without exposing HTML to browsers, or that block or sanitize admonition :class: values at ingestion, are not exploitable. Authentication level of the attacker varies by application design and is not constrained by the vulnerability itself.

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 :class: value such as " onmouseover="alert(document.cookie)", which closes the class attribute and injects an event handler. When Mistune renders this Markdown and the resulting HTML is served to a victim user who loads the page, the injected JavaScript executes in the victim's browser context, enabling theft of session tokens or redirection to a phishing page. No public POC has been identified, but the technique requires only rudimentary knowledge of HTML attribute injection.

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

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

mistune < 3.2.1

Affected Packages

pypi mistune fix: 3.2.1, 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 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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
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
vuln.today AI 6.1 MEDIUM

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

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.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
† 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 75% exploitable
Prevalence
Medium
popular Python Markdown library used broadly in documentation and wiki tooling
Threat Intel
1
1 sources
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC 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 No
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
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

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-59927 MEDIUM POC
5.3 Jul 08

Unbounded recursion in Mistune's Include directive (all versions prior to 3.3.0) can be triggered by a pair of mutually-

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

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