CVE-2026-44897Mistune Project Mistune
Medium 6.1 No auth needed
Follow: this CVE · Mistune Project · Mistune Project Mistune We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- —
- Auth required
- No
- Published
- May 26, 2026
- Updated
- Jul 24, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, HTMLRenderer.heading() builds the opening <hN> tag by string-concatenating the id attribute value directly into the HTML — with no call to escape(), safe_entity(), or any other sanitisation function. A double-quote character " in the id value terminates the attribute, allowing an attacker to inject arbitrary additional attributes (event handlers, src=, href=, etc.) into the heading element. This vulnerability is fixed in 3.2.1.
What to do
- Apply the vendor's security update for Mistune.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | mistune |
< 3.2.1 |
3.2.1 |
pip install "mistune>=3.2.1" |
| PyPI | mistune |
< 3.2.1 |
3.2.1 |
pip install "mistune>=3.2.1" |
Per OSV / GitHub Advisories (GHSA-v87v-83h2-53w7, PYSEC-2026-2207). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| mistune_project | mistune | < 3.2.1 |
Official advisories
- python311-mistune-3.2.1-1.1 on GA media · SUSE · openSUSE-SU-2026:10761-1 · May 12, 2026 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Product Release Notes
- github.com Exploit Vendor Advisory