{"id":"CVE-2026-115355","aliases":["GHSA-h7ww-273w-6cm8"],"title":"Mistune: Path Traversal and XSS in Include directive","summary":"Mistune: Path Traversal and XSS in Include directive","severity":"high","cvss":7.5,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","vendor":"mistune","product":"mistune","ecosystem":"pip","affected":["mistune < 3.3.0"],"patched":["mistune 3.3.0"],"published":"2026-10-23","updated":"2026-10-23","sourceUpdated":"2026-10-23T21:00:06.308204078Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-h7ww-273w-6cm8","references":[{"url":"https://github.com/lepture/mistune/security/advisories/GHSA-h7ww-273w-6cm8"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115355"},{"url":"https://github.com/lepture/mistune/commit/1bef343ade163fc3bb95572b15be720084cdb993"},{"url":"https://github.com/lepture/mistune"},{"url":"https://github.com/lepture/mistune/releases/tag/v3.3.0"},{"url":"https://www.vulncheck.com/advisories/mistune-before-3.3.0-path-traversal-and-xss-via-include-directive"},{"url":"https://github.com/advisories/GHSA-h7ww-273w-6cm8"},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-115355.json"},{"url":"https://access.redhat.com/security/cve/CVE-2026-115355"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2559366"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-115355"}],"tags":["osv","pip","ghsa","csaf","vex","red-hat","cve.org"],"epss":0.00461,"epssPercentile":0.39757,"cvssSource":"vendor","cwe":["CWE-22"],"ingestedAt":"2026-10-22T22:00:50.398Z","slug":"CVE-2026-115355","body":"## Overview\n\nThe Include directive in `src/mistune/directives/include.py` does not validate that the resolved file path stays within the source directory, allowing path traversal via `../` sequences to read arbitrary files.\n\nAdditionally, error messages and included file contents are rendered without HTML escaping, leading to XSS even when `escape=True`.\n\nAffected functions:\n- Path resolution (lines 27-31)\n- `block_error()` in html.py (line 140)\n- `render_html_include()` (line 72)\n\nThe Include plugin must be explicitly enabled via the plugins parameter.\n\n## Affected packages\n\n- `mistune < 3.3.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `mistune 3.3.0`\n\n## Vendor advisories\n\n- **Red Hat VEX** · Important · affected: Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Container Platform 4 · no fix planned: Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Container Platform 4 · updated 2026-10-23 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-115355.json)","depth":"twilight","depthScore":41,"depthScoreParts":{"impact":41.3,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}