Quick answers
- Is CVE-2026-44897 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-44897 being exploited in the wild.
- How severe is CVE-2026-44897?
- Medium severity, with a CVSS score of 6.1, published 26 May 2026.
- Which products and versions are affected?
- mistune (PyPI) <= 3.2.0, ECOSYSTEM:introduced=0,fixed=3.2.1.
- Is there a fix for CVE-2026-44897?
- Yes. mistune (PyPI): upgrade to 3.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-44897 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-44897?
- Check whether you run mistune (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- mistune (PyPI): upgrade to 3.2.1 or later
pip install "mistune>=3.2.1"
Technical details
A Cross-Site Scripting (XSS) vulnerability exists in Mistune's HTMLRenderer.heading() component. The vulnerability stems from the direct string concatenation of the 'id' attribute value into the HTML heading tag without passing it through sanitization functions like escape() or safe_entity(). While the default Table of Contents (TOC) hook uses safe numeric IDs, many real-world implementations use custom callbacks to generate human-readable slugs from heading text. An attacker can craft a heading containing double-quotes to break out of the 'id' attribute and inject arbitrary HTML attributes, such as 'onmouseover' or other event handlers. This issue is resolved in version 3.2.1 by ensuring heading IDs are properly escaped.
Affected products
- lepture Mistune < 3.2.1
Identifiers
- CVE-2026-44897
- GHSA-v87v-83h2-53w7
- PYSEC-2026-2207
Timeline
- 2026-05-03: patched: Fixes included in version 3.2.1 release
- 2026-05-06: advisory: GitHub Security Advisory published
- 2026-05-26: disclosed: CVE published to NVD