OESA-2026-4793: python-mistune security update
The python-mistune package is a fast yet powerful Python Markdown parser with renderers and plugins, compatible with sane CommonMark rules. Security Fix(es):
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 blockhtml 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.(CVE-2026-115350)
Mistune before 3.3.0 contains a path traversal vulnerability in the RST include directive that allows attackers to read arbitrary files by supplying relative or absolute paths. Attackers can submit markdown containing include directives referencing ../ sequences or absolute paths to embed sensitive files like credentials or environment data in rendered HTML.(CVE-2026-115353)
Mistune before 3.3.0 contains a path traversal vulnerability in the opt-in Include directive that allows attackers to read local files by supplying relative or absolute include paths. Attackers who submit Markdown rendered via Markdown.read() can disclose files such as /etc/passwd and inject unescaped HTML or script content into rendered output.(CVE-2026-115354)
Mistune before 3.3.0 contains a path traversal vulnerability in the Include directive that allows attackers to read arbitrary files by supplying ../ sequences in include paths. Attackers can also inject HTML through unescaped error messages and included file contents to perform cross-site scripting even when escape=True is set.(CVE-2026-115355)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
openeuler/python-mistuneto a version that resolves this vulnerability.Fixed in 2.0.4-4.oe2403sp1 - Upgrade
Upgrade
python-mistuneto a version that resolves this vulnerability.Fixed in 3.3.0
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
Which deployments are most exposed to file disclosure?
Deployments that accept attacker-controlled Markdown and render it with the RST include directive or the opt-in Include directive are exposed. The opt-in Include issue specifically affects Markdown processed through Markdown.read(), where relative paths such as ../ or absolute paths can disclose local files.
Does exploitation require authentication or user interaction?
The advisory rates the issues as network-reachable with low attack complexity, no privileges required, and no user interaction. An attacker needs to be able to submit Markdown containing include directives to a renderer that processes them.
When can this lead to stored script execution rather than only file disclosure?
Stored script execution requires the Include directive to reference an attacker-planted readable .html, .xhtml, or .htm file, including through path traversal. The renderer must also be configured with escape=False, causing included HTML to be emitted as raw block_html.
Is the Include directive enabled by default?
The advisory describes the Include directive as opt-in. Systems that have not enabled it are not exposed to the opt-in Include-specific path traversal and XSS behavior described here.
What is the affected version boundary?
Mistune versions before 3.3.0 are affected by the listed issues. Update to a version that includes the 3.3.0 fixes.