CVE-2026-59923

Mistune: XSS via percent-encoded javascript URI bypass in safe_url()

Published Jul 8, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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 CVE description does not indicate any server‑side impact; the vulnerability is confined to client‑side script execution in the end‑user’s browser. Given the moderate score and low EPSS score, the risk is moderate but non‑negligible for exposed systems.

Remediation

No solution or workaround provided in the CVE record.

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 August 3, 2026 at 04:43 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
Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 8, 2026, 4:41 PM
Reserved
Jul 7, 2026, 6:20 PM
Status
Analyzed
Published
Jul 8, 2026, 5:17 PM
Modified
Oct 25, 2026, 5:10 PM
Severity
Moderate
Public date
Jul 8, 2026, 4:14 PM