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. Based on the description, it is inferred that exploitation requires an attacker who can influence the Markdown source rendered by the application, which is common 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 31, 2026 at 13:52 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 31, 2026 at 13:52 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'}


Subscriptions

Lepture Mistune
Mistune Project Mistune
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

Status : Analyzed

Published: 2026-07-08T17:17:28.737

Modified: 2026-07-09T19:29:01.040

Link: CVE-2026-59929

cve-icon Redhat

Severity : Moderate

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

Links: CVE-2026-59929 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T14:00:07Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

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