CVE-2026-59988: django-docutils unsafe Docutils defaults allow local file disclosure, SSRF, and stored XSS
django-docutils provides reStructuredText support for Django. Prior to 0.30.0, public rendering paths including publishdoctree, publishhtmlfromsource, publishhtmlfromdoctree, publishpartsfromdoctree, the {% rst %} template tag, the rst template filter, DocutilsTemplates, and DocutilsView pass lower-trust reStructuredText to Docutils without disabling fileinsertionenabled, rawenabled, ambient docutils.conf processing, or unsafe URI schemes and without consistently sanitizing doctrees. An attacker who can influence rendered reStructuredText can use include or csv-table directives to read local files or cause server-side URL requests, or use raw HTML and unsafe URI output to inject stored script-capable content. Applications that render only trusted static reStructuredText are not affected unless attackers can influence it. This issue is fixed in version 0.30.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
django-docutilsto a version that resolves this vulnerability.Fixed in 0.30.0
Event History
Frequently Asked Questions
Which applications are actually exposed?
Applications are exposed when an attacker can influence reStructuredText that is rendered through django-docutils public rendering paths. Applications that render only trusted, static reStructuredText are not affected unless an attacker can influence that content.
What can an attacker do with control over rendered reStructuredText?
They can use include or csv-table directives to read local files or trigger server-side URL requests. They can also use raw HTML and unsafe URI output to inject stored script-capable content.
Which django-docutils interfaces are implicated?
The affected public paths include publish_doctree, publish_html_from_source, publish_html_from_doctree, publish_parts_from_doctree, the {% rst %} template tag, the rst template filter, DocutilsTemplates, and DocutilsView.
What is the available fix?
Upgrade django-docutils to version 0.30.0, which fixes this issue.