CVE-2026-144966: Docutils before 0.23.1 XSS via Unescaped Image Alt Text in HTML Writers
Docutils before 0.23.1 contains a cross-site scripting vulnerability that allows attackers supplying reStructuredText to inject HTML through the image directive's :alt: option. The html4css1 and html5 writers copy unescaped alt text into object or video fallback content, so script elements execute in viewers' browsers even with rawenabled disabled.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
docutilsto a version that resolves this vulnerability.Fixed in 0.23.1
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications that accept reStructuredText from untrusted users and render it with Docutils' html4css1 or html5 writers are exposed. The injected content executes in the browsers of people viewing the generated HTML.
Does disabling raw markup prevent exploitation?
No. The issue is reachable through the image directive's :alt: option even when raw_enabled is disabled.
What does an attacker need to exploit it?
An attacker needs a way to supply reStructuredText that the application converts to HTML using an affected writer, and a victim must view the resulting HTML. No authentication is required according to the supplied vector.
Which versions are affected?
Docutils versions before 0.23.1 are affected.