---
id: "GHSA-8cqv-vvq2-6p8c"
kind: "vulnerability"
aliases: ["GHSA-8cqv-vvq2-6p8c"]
title: "Duplicate Advisory: Mistune: Path Traversal and XSS in Include directive"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "withdrawn"
category: "package"
products: [{"name": "mistune", "fixed": [], "affected": "< 3.3.0", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-22", "mistune", "package", "pypi", "python"]
not_affected_if: ["markdown-from-trusted-sources-only", "mistune-3.3.0-or-later", "no-include-directive-used"]
published_at: "2026-10-22T21:32:36+00:00"
first_seen_at: "2026-10-23T20:59:05+00:00"
updated_at: "2026-10-23T21:00:23+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-8cqv-vvq2-6p8c", "first_seen_at": "2026-10-23T20:59:05+00:00"}]
---

# Duplicate Advisory: Mistune: Path Traversal and XSS in Include directive

This advisory is a withdrawn duplicate of GHSA-h7ww-273w-6cm8 and describes a flaw in the Mistune Python Markdown library before 3.3.0. An attacker who can supply Markdown to an affected Mistune Include directive can read arbitrary files via ../ path sequences and inject HTML/XSS even with escape=True.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:mistune affected < 3.3.0 fixed ?

## How to check

pip show mistune or pip freeze | grep -i mistune to get the installed version; flag anything below 3.3.0 and check whether any Include directive is enabled on user-supplied Markdown.

## Fix

Upgrade mistune to 3.3.0 or later; track GHSA-h7ww-273w-6cm8 as the canonical advisory.

## Timeline

- 2026-10-23T20:59:05+00:00 ghsa https://github.com/advisories/GHSA-8cqv-vvq2-6p8c

## From the sources

## Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-h7ww-273w-6cm8. This link is maintained to preserve external references.

## Original Description
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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
