# CVE-2026-44897: Mistune Heading ID Attribute Injection XSS

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-09T00:13:12.000Z
- Modified: 2026-09-10T03:50:47.725Z
- Also known as: GHSA-v87v-83h2-53w7, PYSEC-2026-2207
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- lepture mistune: < 3.2.1
- mistune (PyPI): before 3.2.1
- mistune_project mistune: before 3.2.1

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/lepture/mistune/security/advisories/GHSA-v87v-83h2-53w7> (exploit, evidence, vendor-advisory, web)
- <https://github.com/lepture/mistune/releases/tag/v3.2.1> (advisory, product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-44897> (advisory)
- <https://github.com/lepture/mistune> (package)

## Sources

- CVE List: [CVE-2026-44897](https://www.cve.org/CVERecord?id=CVE-2026-44897), CVE Terms of Use, modified 2026-06-01
- GitHub Advisory Database: [GHSA-v87v-83h2-53w7](https://github.com/advisories/GHSA-v87v-83h2-53w7), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-44897](https://nvd.nist.gov/vuln/detail/CVE-2026-44897), Public domain, modified 2026-07-24
- PyPA Advisory Database: [PYSEC-2026-2207](https://osv.dev/vulnerability/PYSEC-2026-2207), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-44897 · Whole record: https://cve.day/CVE-2026-44897.json · Rebuilt by cve.day 2026-11-25T22:59:22.383Z
