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

Impact

Mistune is a Python Markdown parser. In versions prior to 3.3.0, the HTMLRenderer.safe_url() method fails to block percent‑encoded javascript: URIs. An attacker can supply a Markdown link or image containing such an encoded URI, causing the rendered HTML to execute arbitrary JavaScript in the visitor’s browser. This is a client‑side XSS vulnerability (CWE‑79).

Affected Systems

Any deployment of the mistune Python package from the lepture organization that is affected. The issue has been fixed in release 3.3.0; upgrading to that or a later version removes the ability to render percent‑encoded javascript URIs via safe_url()

Risk and Exploitability

The CVSS score of 6.1 indicates moderate severity. The EPSS score is < 1%, indicating a very low but non‑zero exploitation probability. The vulnerability is not listed in the CISA KEV catalog, suggesting no widely documented exploitation. Based on the description, the likely attack vector involves an attacker providing crafted Markdown content to an application that renders it with mistune, leading to script execution in the end‑user’s browser. The flaw does not affect server‑side state, but the risk remains significant for any site that accepts or displays untrusted Markdown. Given the moderate score and low EPSS score, the risk is moderate but non‑negligible for exposed systems.

Generated by OpenCVE AI on July 29, 2026 at 13:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade mistune to version 3.3.0 or later.
  • If an upgrade is not immediately possible, configure the application to sanitize or strip javascript: URLs and any percent‑encoded variants from Markdown before rendering.
  • Avoid rendering Markdown content from untrusted or malicious sources; consider rejecting or stripping user‑supplied Markdown outside of a controlled environment.

Generated by OpenCVE AI on July 29, 2026 at 13:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8c25-4j27-2rv3 Mistune: XSS via percent-encoded javascript URI bypass in safe_url()
History

Fri, 10 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


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 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


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, 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.
Title Mistune: XSS via percent-encoded javascript URI bypass in safe_url()
Weaknesses 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-08T16:41:52.111Z

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

Link: CVE-2026-59923

cve-icon Vulnrichment

Updated: 2026-07-08T16:41:10.158Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-08T16:14:39Z

Links: CVE-2026-59923 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T14:00:03Z

Weaknesses
  • CWE-79

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