{"id":"CVE-2026-115355","aliases":["CVE-2026-115355","GHSA-h7ww-273w-6cm8"],"related":[],"kind":"vulnerability","state":"published","title":"Mistune before 3.3.0 Path Traversal and XSS via Include Directive","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"The 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.","format":"markdown","source":"ghsa"}],"published":"2026-10-22T19:13:31.904Z","modified":"2026-10-29T14:17:48.340Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.3.0","status":"affected"},{"type":"semver","version":"3.3.0","status":"unaffected"}],"vendor":"lepture","product":"mistune","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.3.0"}],"ecosystem":"PyPI","package":"mistune","purl":"pkg:pypi/mistune","source":"ghsa"}],"references":[{"url":"https://github.com/lepture/mistune/security/advisories/GHSA-h7ww-273w-6cm8","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/mistune-before-3.3.0-path-traversal-and-xss-via-include-directive","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115355","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/lepture/mistune/commit/1bef343ade163fc3bb95572b15be720084cdb993","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/lepture/mistune","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/lepture/mistune/releases/tag/v3.3.0","tags":["web"],"sources":["ghsa"]}],"credits":["sergeykochanov"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-29T13:46:05.214Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-115355","url":"https://www.cve.org/CVERecord?id=CVE-2026-115355","licence":"CVE Terms of Use","modified":"2026-10-29T13:48:43.278Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h7ww-273w-6cm8","url":"https://github.com/advisories/GHSA-h7ww-273w-6cm8","licence":"CC-BY-4.0","modified":"2026-10-23T21:00:06.308Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-115355","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115355","licence":"Public domain","modified":"2026-10-29T14:17:48.340Z"}],"updatedAt":"2026-11-25T22:59:46.807Z","epss":{"score":0.00461,"percentile":0.41633,"date":"2026-12-01T12:00:22.000Z"}}