Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 86%

CVE-2026-44897: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lepture mistune

0
Medium
VulnerabilityCVE-2026-44897cvecve-2026-44897cwe-79
Published: 05/26/2026 (05/26/2026, 20:40:42 UTC)
Source: CVE Database V5
Vendor/Project: lepture
Product: mistune

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.

CVSS v3.1

Score 6.1medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected software

mistune
pkg:pypi/mistune
Affected versions
<3.2.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/03/2026, 20:28:26 UTC

Technical Analysis

Mistune versions before 3.2.1 have an XSS vulnerability (CWE-79) in the HTMLRenderer.heading() function. The function builds the opening heading tag by concatenating the id attribute value directly into the HTML output without escaping or sanitizing special characters. If the id contains a double-quote character, it breaks out of the attribute context, enabling injection of arbitrary additional attributes such as event handlers or malicious URLs. This can lead to cross-site scripting attacks when untrusted input is rendered. The issue is resolved in version 3.2.1.

Potential Impact

An attacker can exploit this vulnerability by crafting a malicious id value containing a double-quote character to inject arbitrary HTML attributes into heading elements. This can result in cross-site scripting, potentially allowing execution of attacker-controlled scripts in the context of users viewing the rendered Markdown. The impact includes limited confidentiality and integrity loss, with no availability impact. There are no known exploits in the wild at this time.

Mitigation Recommendations

Upgrade Mistune to version 3.2.1 or later, where this vulnerability is fixed by properly escaping the id attribute in HTMLRenderer.heading(). Since this is a library vulnerability, applying the official fix by updating the package is the recommended remediation. Patch status is confirmed fixed in version 3.2.1. No alternative mitigations are indicated.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-07T21:50:33.546Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a174b8ce29bf47b50e4a24b

Added to database: 05/27/2026, 19:52:44 UTC

Last enriched: 06/03/2026, 20:28:26 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 57

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses