# CVE-2026-144966: Docutils before 0.23.1 XSS via Unescaped Image Alt Text in HTML Writers

Source: https://aplosec.si/cve/CVE-2026-144966/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-144966

Medium 5.3 · Reported · Fixed in 0.23.1 · CWE-79 · PyPI

# Docutils before 0.23.1 XSS via Unescaped Image Alt Text in HTML Writers

CVE-2026-144966 · published 2026-12-04

In plain words: this type of bug lets someone run scripts in another person's browser (cross-site scripting, XSS). A fixed release is listed.

## Summary

CVE-2026-144966 affects Docutils (PyPI) < 0.23.1: XSS via Unescaped Image Alt Text in HTML Writers (CWE-79). Fixed in 0.23.1. CVSS 4.0 base score 5.3 (Medium), assigned by VulnCheck. Published 2026-12-04 by VulnCheck. Credit: Zachariah Mithani (AploSec).

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 raw_enabled disabled.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

Upgrade Docutils to 0.23.1 or later. Releases in the affected range (< 0.23.1) are vulnerable. See the linked advisory for details on affected release lines.

## Timeline

- 2026-12-04 CVE published

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/docutils-before-0.23.1-xss-via-unescaped-image-alt-text-in-html-writers](https://www.vulncheck.com/advisories/docutils-before-0.23.1-xss-via-unescaped-image-alt-text-in-html-writers)

- [Fix commithttps://github.com/docutils/docutils/commit/cf44fc7bda43e6dc362d13edc373070a7d82afd5](https://github.com/docutils/docutils/commit/cf44fc7bda43e6dc362d13edc373070a7d82afd5)

- [Referencehttps://pypi.org/project/docutils/0.23.1/](https://pypi.org/project/docutils/0.23.1/)

- [Vulnerable codehttps://github.com/docutils/docutils/blob/7736f5a7cdf287b85204d5ffe50b141e97bf7448/docutils/docutils/writers/html4css1/__init__.py#L617-L620](https://github.com/docutils/docutils/blob/7736f5a7cdf287b85204d5ffe50b141e97bf7448/docutils/docutils/writers/html4css1/__init__.py#L617-L620)

- [Vulnerable codehttps://github.com/docutils/docutils/blob/7736f5a7cdf287b85204d5ffe50b141e97bf7448/docutils/docutils/writers/_html_base.py#L1200-L1211](https://github.com/docutils/docutils/blob/7736f5a7cdf287b85204d5ffe50b141e97bf7448/docutils/docutils/writers/_html_base.py#L1200-L1211)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-144966](https://www.cve.org/CVERecord?id=CVE-2026-144966)

- [NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-144966](https://nvd.nist.gov/vuln/detail/CVE-2026-144966)

**Severity:** Medium 5.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-144966)

**Package:** Docutils

**Ecosystem:** PyPI

**Affected:** < 0.23.1

**Fixed:** 0.23.1

**Weakness:** CWE-79

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
