CVE-2026-115351: Mistune 3.2.1 before 3.3.0 CSS Injection via Figure Directive figwidth Option
Mistune from 3.2.1 before 3.3.0 contains a CSS injection vulnerability that allows attackers controlling markdown input to inject arbitrary style declarations via the unvalidated figwidth option of the figure directive. Attackers can append declarations like background:url() to the rendered figure style attribute, forcing victim browsers to send requests to attacker servers and leak attribute values.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/mistuneto a version that resolves this vulnerability.Fixed in 3.4.0-1
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using Mistune versions 3.2.1 through before 3.3.0 are exposed when they render Markdown controlled by an attacker and deliver the rendered figure to a victim's browser.
What does an attacker need to exploit it?
The attacker needs control over Markdown input containing a figure directive and its figwidth option. Exploitation also requires a victim to view the rendered content in a browser.
What should be done if the application accepts untrusted Markdown?
Upgrade Mistune to version 3.3.0 or later. Until upgrading, prevent untrusted users from supplying figure directives or the figwidth option, and review rendered figure style attributes for injected CSS declarations.