Skip to main content

Docutils CVE-2026-144966

| EUVDEUVD-2026-144247 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-12-04 VulnCheck GHSA-v94f-35v7-v735
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit malicious reStructuredText to renderer
  2. Delivery
    Image directive targets video/object media
  3. Exploit
    Crafted :alt: text carries script payload
  4. Execution
    Victim views generated HTML page
  5. Impact
    Injected script executes in browser

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a deployment that renders attacker-controlled reStructuredText to HTML using the html4css1 or html5 writer, AND the attacker's image directive must target a resource that Docutils emits as an <object> or <video> element with fallback content (i.e., a non-image media type such as video, not a plain <img>) - this is the specific code path where the :alt: option is copied in unescaped. The payload is placed in the image directive's :alt: option. Critically, the flaw triggers even when raw_enabled is disabled, so that hardening setting does NOT limit it. Limiting factors that reduce real-world risk: the target service must accept and render untrusted reStructuredText; a victim must subsequently view the generated page (UI:P/UI:R); and the injection only fires through the object/video fallback path, not ordinary <img> alt attributes (which are escaped).

Impact

This is a medium-severity stored/reflected cross-site scripting flaw (CWE-79) with a provided CVSS 4.0 base vector of AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N (5.3). The signals are internally consistent and point to a real-but-bounded issue rather than an emergency: the vuln.today Decision label is 'this_month' (not act_now/emergency), there is no CISA KEV listing and no EPSS score supplied in the input, so widespread or automated exploitation cannot be asserted from the available data - their absence is noted, not treated as proof of low risk. No standalone weaponized exploit is published; however, the vendor fix commit ships regression tests containing the exact trigger payload (<script>alert(1)</script> in :alt:), so reproduction is trivial for anyone reading the public commit. The most important aggravating factor is explicit in the description: the injection executes 'even with raw_enabled disabled', meaning operators who deliberately render untrusted reStructuredText while relying on raw_enabled=False as their safety control are exposed despite that mitigation. Exploitation still requires a deployment that renders attacker-supplied rST and a victim who views the output (UI:P/UI:R), which caps real-world impact to C:L/I:L. Net: a genuine but moderate-priority XSS, best handled in the normal patch cycle consistent with the 'this_month' label.

Exploit ScenarioDerived

An attacker submits crafted reStructuredText to a service that renders it to HTML with Docutils' html5 or html4css1 writer (e.g., a documentation host, wiki, or README/preview renderer). They use an image directive whose target is a media file emitted as an <object> or <video> element and set an :alt: option containing a <script> payload; the unescaped alt text is copied into the fallback content and executes in the browser of any user who later views the page, bypassing raw_enabled=False. No published standalone exploit exists, but the fix's regression tests document the exact trigger payload.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 04, 2026

Cross-site scripting in Docutils before 0.23.1 lets an attacker who supplies reStructuredText inject HTML through the image directive's :alt: option, because the html4css1 and html5 writers copy that alt text unescaped into the fallback content of <object> or <video> elements, so an injected script element executes in the browser of anyone who views the generated page. The flaw is exploitable only in deployments that render attacker-controlled reStructuredText to HTML with one of those two writers and only when the image directive resolves to a non-image media type that is emitted as an object/video container rather than a plain <img>; notably it still triggers with raw_enabled disabled, so that hardening setting provides no protection. The CVSS 4.0 base score is 5.3 (AV:N/AC:L/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N), a vendor patch is available in 0.23.1, and no public exploit was identified at time of analysis; priority is assessed as this_month rather than immediate action.

RemediationAI

Vendor-released patch: upgrade to Docutils 0.23.1 (https://pypi.org/project/docutils/0.23.1/), which encodes alt text in the object and video fallback paths; the corresponding upstream change is commit cf44fc7bda43e6dc362d13edc373070a7d82afd5 and the vendor advisory is https://www.vulncheck.com/advisories/docutils-before-0.23.1-xss-via-unescaped-image-alt-text-in-html-writers. Note that setting raw_enabled to False does not mitigate this issue, since the payload travels through the writer's alt-text handling rather than raw HTML parsing. Where immediate upgrade is not possible, the actionable compensating controls are: stop feeding untrusted reStructuredText into the html4css1 or html5 writer (restrict submissions to trusted authors or render in a sandboxed build step) - this removes the attack surface but limits legitimate user-generated content; or pass the generated HTML through an allowlist-based output sanitizer before serving it - this neutralizes injected script in the object/video fallback but adds a processing step and may strip legitimate markup; or serve generated documentation from a separate origin or behind a restrictive Content-Security-Policy - which reduces script execution impact but is a containment measure, not a fix.

Affected VersionsENISA

Docutils 0 <0.23.1

Affected Packages

euvd docutils fix: 0.23.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Docutils is the Python reference implementation of the reStructuredText parser and its output writers. The vulnerability is class CWE-79 (improper neutralization of input during web page generation) and sits in the HTML writer family: docutils/writers/_html_base.py (used by the html5 writer) and docutils/writers/html4css1/__init__.py. In visit_image(), both writers normally escape alt text, but the branch that renders non-image media such as video files emits an <object> (html4css1) or <video> (html5/polyglot) element with a text or anchor fallback, and that fallback was built by concatenating the raw node['alt'] value without calling self.encode(). An attacker therefore only needs the :alt: option of an image directive to carry markup such as a script element; the parser-level raw_enabled restriction does not sanitize this path because the value flows through the writer rather than raw HTML parsing. The upstream fix (commit cf44fc7bda43e6dc362d13edc373070a7d82afd5, released in 0.23.1) wraps the alt text in self.encode() for both the <object> and <video>/anchor cases and adds regression tests asserting that an :alt: of <script>alert(1)</script> is emitted as &lt;script&gt;alert(1)&lt;/script&gt; in the object and video fallback output. The same commit additionally adjusts html4css1 MIME mapping, adding an .ogv -> video/ogg entry and changing .ogg to application/ogg. Plain <img> alt attributes were already escaped and are not the injection point; the trigger is specifically the object/video fallback code path, and the supplied evidence does not describe any other trigger.

Know when Docutils gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 6.1 MEDIUM

Attacker supplies rST remotely without privileges (AV:N/PR:N), a victim must view the rendered page (UI:R), script runs in the victim's browser context giving a scope change (S:C) with limited confidentiality/integrity impact and no availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

Prevalence
High
core reStructuredText-to-HTML library across Python documentation toolchains
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy