VDB
Sign up
MEDIUM6.1

PYSEC-2026-2206

Quick fix

PYSEC-2026-2206 — mistune: upgrade to the fixed version with the command below.

pip install --upgrade 'mistune>=3.2.1'

Details

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, the mistune math plugin renders inline math ($...$) and block math ($$...$$) by concatenating the raw user-supplied content directly into the HTML output without any HTML escaping. This occurs even when the parser is explicitly created with escape=True, which is supposed to guarantee that all user-controlled text is sanitised before reaching the DOM. This vulnerability is fixed in 3.2.1.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/mistune
Introduced in: 0Fixed in: 3.2.1
Fixpip install --upgrade 'mistune>=3.2.1'

References