Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-44896 EUVD-2026-31991GHSA-58cw-g322-p94vPYSEC-2026-168

Mistune: XSS via unescaped figclass/figwidth in Figure directive

Published May 26, 2026 · Updated Jun 8, 2026 · Assigned by GitHub_M

Description

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Affected products

VendorProductAffectedFixed
lepture mistune < 3.2.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 mistune No fix yet —
Debian 13 mistune No fix yet —
Debian 12 mistune No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 mistune +1 No fix yet —
Ubuntu 26.04 LTS mistune No fix yet —
Ubuntu 25.10 mistune +1 No fix yet —
Ubuntu 24.04 LTS mistune No fix yet —
Ubuntu 20.04 LTS mistune No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS mistune No fix yet —
Ubuntu 16.04 LTS mistune No fix yet —
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-mistune 3.1.3-160000.5.1 SUSE-SU-2026:22655-1
SLES 16.0 python-mistune 3.1.3-160000.5.1 SUSE-SU-2026:22655-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 python-mistune 3.1.3-160000.5.1 openSUSE-SU-2026:21339-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-mistune 3.2.1-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling kubeflow-pipelines-visualization-server 2.16.1-r2 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI mistune < 3.2.1 3.2.1 GHSA-58cw-g322-p94v

Advisories 2

References