CVE-2026-44896: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lepture mistune
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.
AI Analysis
Technical Summary
CVE-2026-44896 is a cross-site scripting vulnerability in the Mistune Python Markdown parser (lepture project). In versions 3.2.0 and earlier, the render_figure() function in src/mistune/directives/image.py improperly concatenates user-supplied figclass and figwidth options into HTML attributes without escaping. This bypasses the HTMLRenderer's escape mechanism, enabling attribute injection and XSS attacks. The issue is resolved in version 3.2.1.
Potential Impact
An attacker can inject malicious HTML attributes via the figclass and figwidth options in Markdown content, leading to cross-site scripting attacks. This can result in execution of arbitrary scripts in the context of the vulnerable application, potentially compromising user data or session integrity. The CVSS 4.0 base score is 5.3 (medium severity), indicating a moderate risk with network attack vector, low complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
Upgrade to Mistune version 3.2.1 or later, where the vulnerability in render_figure() is patched. No other mitigations are indicated or required as the fix addresses the root cause by properly escaping the input before rendering.
CVE-2026-44896: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lepture mistune
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.
CVSS v4.0
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-44896 is a cross-site scripting vulnerability in the Mistune Python Markdown parser (lepture project). In versions 3.2.0 and earlier, the render_figure() function in src/mistune/directives/image.py improperly concatenates user-supplied figclass and figwidth options into HTML attributes without escaping. This bypasses the HTMLRenderer's escape mechanism, enabling attribute injection and XSS attacks. The issue is resolved in version 3.2.1.
Potential Impact
An attacker can inject malicious HTML attributes via the figclass and figwidth options in Markdown content, leading to cross-site scripting attacks. This can result in execution of arbitrary scripts in the context of the vulnerable application, potentially compromising user data or session integrity. The CVSS 4.0 base score is 5.3 (medium severity), indicating a moderate risk with network attack vector, low complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
Upgrade to Mistune version 3.2.1 or later, where the vulnerability in render_figure() is patched. No other mitigations are indicated or required as the fix addresses the root cause by properly escaping the input before rendering.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-07T21:50:33.546Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a16f9eae29bf47b50c0f5c5
Added to database: 05/27/2026, 14:04:26 UTC
Last enriched: 06/10/2026, 22:19:35 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 74
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.