Description
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.
Published: 2026-07-08
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mistune’s safe_url filter, before version 3.3.0, blocked only javascript:, vbscript:, file:, and data: schemes but omitted legacy or chained schemes such as feed:, view‑source:, jar:, livescript:, mocha:, ms‑its:, mk:, and res:. These omitted schemes can lead to a javascript: URL when chained, enabling an attacker to embed Markdown that, when rendered, injects JavaScript into a victim’s browser and triggers a cross‑site scripting event, a weakness classified as CWE‑184 and CWE‑79.

Affected Systems

All releases of the Mistune Python Markdown parser prior to 3.3.0 are affected, including the 3.2.x series and earlier; any application that renders Markdown content with a vulnerable version—collaborative editors or web services handling user‑supplied Markdown—is at risk.

Risk and Exploitability

The CVSS base score of 6.1 indicates moderate severity, and the EPSS score of less than 1% suggests a very low likelihood of exploitation; the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker who can influence the Markdown source rendered by the application, a common scenario for sites accepting user input; by chaining legacy protocols to a javascript: URL, the attacker can cause arbitrary script execution in the victim’s browser.

Generated by OpenCVE AI on July 26, 2026 at 17:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or later, where the safe_url filter correctly blocks legacy and chained protocols.
  • If upgrading is not immediately possible, post‑process or strip Markdown URLs that use legacy or chained schemes such as URLs to add an additional defense in depth.
  • Add an additional URL validation layer that blocks legacy or chained protocols—feed:, view‑source:, jar:, livescript:, mocha:, ms‑its:, mk:, and res:—before passing content to Mistune, to ensure safety even if the library changes.

Generated by OpenCVE AI on July 26, 2026 at 17:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-qfrw-5rxm-mhh2 Mistune renderers/html.safe_url: HARMFUL_PROTOCOLS list misses legacy and chained schemes that historically chain to `javascript:` execution
History

Sat, 11 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 09 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune

Wed, 08 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Mistune renderers/html.safe_url: HARMFUL_PROTOCOLS list misses legacy and chained schemes that historically chain to `javascript:` execution
Weaknesses CWE-184
CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T14:41:36.793Z

Reserved: 2026-07-07T18:20:06.126Z

Link: CVE-2026-59929

cve-icon Vulnrichment

Updated: 2026-07-09T14:21:09.948Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-08T16:20:38Z

Links: CVE-2026-59929 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:30:17Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')