Skip to main content

Mistune CVE-2026-115350

| EUVDEUVD-2026-108419 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-22 disclosure@vulncheck.com GHSA-pw44-j765-r9gj
5.3
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

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

  1. Access
    Identify app using mistune with escape=False
  2. Delivery
    Plant .html payload via file-upload or log write
  3. Exploit
    Submit markdown with include directive and traversal path
  4. Execution
    Renderer emits included file as unescaped block_html
  5. Persist
    Victim loads rendered page
  6. Impact
    Script executes in origin, exfiltrates session cookies

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 ALL of the following, drawn from the advisory: (1) the mistune renderer is constructed with escape=False - a documented and vendor-recommended setting for sites that trust their markdown corpus, but NOT the default; (2) the Include directive is enabled via RSTDirective([Include()]); (3) the filesystem rendering context is active, i.e. state env '__file__' is set so include paths resolve; (4) the attacker can write a file with a .html/.xhtml/.htm extension to any location readable by the rendering process (via an upload form that doesn't check content type, log-file injection, or a separate write primitive); and (5) the attacker can submit markdown that references that file, using path traversal ('../') per the companion advisory to reach it outside the source directory. A victim must then view the rendered page (UI/passive interaction) for the stored script to run. LIMITING FACTORS that reduce real-world risk: with the default escape=True, the included HTML is entity-escaped and the attack fails entirely; without a usable file-plant primitive the chain cannot start; and the Include directive must be explicitly enabled.

Impact

This is a genuinely medium-severity, highly conditional stored XSS rather than a broad emergency. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, VC:L/VI:L/SC:L/SI:L) yields 5.3 and models low confidentiality/integrity impact on both the vulnerable system and a subsequent system (the victim browser), consistent with XSS. However, the AC:L rating understates reality: the advisory itself establishes that exploitation requires the operator to have set escape=False (a documented but non-default configuration), the Include/RSTDirective to be enabled, and the attacker to first obtain a file-write primitive to plant a .html file readable by the renderer (the advisory explicitly chains this with a separate path-traversal flaw). Those stacked, partly attacker-uncontrolled preconditions argue for AC:H, which the vendor vector does not reflect - a signal worth flagging to defenders. No EPSS score and no KEV status are present in the input, so there is no evidence of active or at-scale exploitation; the vuln.today decision label is 'this_month', not act_now/emergency. Working proof-of-concept code is published in the GHSA advisory (verified against mistune 3.2.1), so exploitability is demonstrated even though mass exploitation is not indicated. Net: real but not urgent - prioritize for the normal monthly patch cycle, with escalation only for deployments known to run escape=False plus the Include directive.

Exploit ScenarioDerived

A knowledge-base or wiki platform renders user markdown with mistune configured escape=False and the Include directive enabled. An attacker uploads a file with a .html extension (e.g. via an avatar/attachment form that doesn't validate content type) containing a <script> payload, then submits markdown using '.. include:: ../../path/payload.html' with path traversal to reach it; mistune emits the file verbatim as a raw block_html token and the script executes in the site's origin when any user views the page. Publicly available exploit code exists in the vendor GHSA advisory, verified against mistune 3.2.1.

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 – Oct 22, 2026

Stored cross-site scripting in Mistune's Include directive (fixed in 3.3.0) allows an attacker who can plant a .html/.xhtml/.htm file anywhere the renderer can read it to have that file's contents emitted as raw block_html and executed in the application's origin. Real-world exposure is narrow and highly conditional: the deployment must explicitly enable RSTDirective([Include()]), construct the renderer with escape=False, run in a filesystem context where state env['__file__'] is set, and the attacker must already have a separate file-write primitive plus a victim who views the rendered page - with the documented default escape=True the included HTML is entity-escaped and the chain fails. No CISA KEV listing or active exploitation is reported; a working proof-of-concept reproduction (verified against mistune 3.2.1) is published in the upstream GitHub advisory, and the bug is rated this_month in priority rather than emergency.

RemediationAI

Vendor-released patch: mistune 3.3.0 (upgrade from any version <= 3.2.1 via pip install --upgrade mistune), as recorded in GHSA-96vr-jm8v-g22j (https://github.com/lepture/mistune/security/advisories/GHSA-96vr-jm8v-g22j) and the VulnCheck advisory (https://www.vulncheck.com/advisories/mistune-before-3.3.0-stored-xss-via-include-directive-html-files). The upstream fix replaces the raw block_html emission for .html/.xhtml/.htm includes with escaped code-block output, optionally gated behind an explicit Include(allow_html=True) opt-in, and should be paired with the path-containment change from the companion traversal advisory. If upgrading immediately is not possible, the highest-value interim control is to keep or restore the default escape=True on the renderer, under which included HTML is entity-escaped and the payload cannot execute - at the cost of changing how inline HTML in trusted markdown renders; alternatively, stop registering the Include directive altogether, which removes the feature but closes the vector. Because the chain depends on an attacker-controlled file on disk, also restrict the renderer's read scope (no ../ or absolute include paths) and ensure upload handlers validate content type and do not store .html files in readable locations - noting that these only narrow, and do not close, the attack surface described in the advisory.

Affected VersionsENISA

mistune 0 <3.3.0

Affected Packages

euvd mistune fix: 3.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Mistune is a pure-Python Markdown parser; its src/mistune/directives/include.py implements the reStructuredText-style .. include:: directive by dispatching on the included file's extension. Markdown extensions (.md, .markdown, .mkd) are recursively parsed into a nested state, but HTML extensions (.html, .xhtml, .htm) are returned as {'type': 'block_html', 'raw': content} - a token that the HTML renderer in renderers/html.py passes through verbatim when the renderer was built with escape=False, and only wraps in escape_text() when escape=True. The root cause is CWE-79 (with CWE-95 also cited upstream): a file-extension heuristic conflates "this content has HTML semantics" with "this content is trusted," even though the markdown source - and therefore the :: path argument, including ../ traversal per the companion path-traversal advisory - is attacker-controlled. There is no per-file allowlist or sanitisation applied to the included content, so the block_html token effectively asserts trust the renderer never verified. The attack chain is: plant an .html payload via any upload channel that does not validate content type, log-file injection, or a separate write primitive; submit markdown such as .. include:: ../../tmp/uploads/payload.html; have it resolved and emitted unescaped; victim views the page. Because the chain requires a configuration choice (escape=False), an explicitly enabled plugin, an active filesystem state, an independent file-write primitive and victim interaction, the independent assessment scores it CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N rather than the vendor-published 5.3.

Know when the next one hits your stack

  • 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 (vulncheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 4.7 MEDIUM

AC:H because exploitation depends on non-default escape=False plus a separate file-plant/traversal primitive; UI:R as a victim must view the page; S:C with C:L/I:L for script execution in the browser origin.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Red Hat 6.1 MEDIUM

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Oct 22, 2026 - 20:18 EUVD

DescriptionCVE.org

Mistune before 3.3.0 contains a cross-site scripting vulnerability in the Include directive that emits included .html, .xhtml, or .htm file content as raw block_html tokens. Attackers who can plant an HTML file readable by the renderer can reference it via an include directive, combined with path traversal, to execute stored scripts when escape=False is set.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular Python markdown library, but vulnerable Include+escape=False config is uncommon
Data Quality
6 sources
Confidence: High

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 No
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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
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.

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy