Skip to main content

django-docutils CVE-2026-59988

| EUVDEUVD-2026-130394 HIGH
Path Traversal (CWE-22)
2026-11-19 GitHub_M GHSA-86mf-q4h5-69gp
8.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted RST into user-authored field
  2. Exploit
    Vulnerable path hands content to Docutils with unsafe defaults
  3. Execution
    include/csv-table/raw directive expands server-side
  4. Impact
    Read local secrets, trigger SSRF, or emit stored XSS

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

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

Exploitation Conditions

Exploitation requires that the application render attacker-influenced or lower-trust reStructuredText through a vulnerable public path (publish_doctree, publish_html_from_source, publish_html_from_doctree, publish_parts_from_doctree, the {% rst %} template tag, the rst filter, DocutilsTemplates, or DocutilsView) on django-docutils <= 0.29.0 using the default configuration, where file_insertion_enabled, raw_enabled, and ambient docutils.conf processing remain active and unsafe URI schemes are not filtered. Concrete abusable features are the '.. include::' and '.. csv-table:: :file:'/':url:' directives (local file read / SSRF) and '.. raw:: html' (unescaped HTML/XSS). The key limiting factor is that an attacker must be able to inject RST into a rendered sink - comments, wiki/blog bodies, profile or CMS fields, uploaded RST, or API-supplied RST; sites that render only trusted static RST, or that have explicitly opted into safe settings, are not exploitable. No authentication is required by the rendering path itself, but the practical prerequisite is an application feature that accepts and renders untrusted RST.

Impact

The CVSS 3.1 base score of 8.2 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N) signals a network-reachable, low-complexity flaw needing no privileges or user interaction, with high confidentiality impact (local file disclosure) and low integrity impact (stored HTML/script injection). However, the raw vector overstates universal risk: exploitability is entirely gated by a deployment condition the CVSS does not capture - the application must render attacker-influenced or lower-trust reStructuredText through a vulnerable public path on versions <= 0.29.0 with default (unsafe) Docutils settings. Applications that render only trusted static RST are not affected. No EPSS score and no KEV listing are present in the input, so there is no signal of confirmed active or widespread exploitation; the vuln.today Decision label is 'this_week' (not act_now or emergency), consistent with a serious-but-not-emergency priority. A proof-of-concept harness is published inside the GHSA advisory itself, lowering the barrier to weaponization. Net assessment: a genuine high-severity issue for any site accepting user-authored RST (comments, wikis, profiles, CMS fields, uploaded documents), but the real-world blast radius is constrained by the niche footprint of the package and by the requirement that untrusted RST actually reaches a rendering path.

Exploit ScenarioDerived

An attacker submits crafted reStructuredText into a field a vulnerable django-docutils integration renders - a comment, wiki page, profile bio, CMS field, or uploaded RST document. Because file insertion, raw directives, and ambient docutils.conf processing are enabled by default before 0.30.0, a '.. include:: /etc/passwd' or '.. csv-table:: :file:' directive expands server-side to read files readable by the Django worker (configuration, .env, credentials, mounted secrets), a ':url:' variant triggers server-side requests (SSRF), and '.. raw:: html' emits unescaped script-capable HTML (stored XSS). A working proof-of-concept harness using the public {% rst %} template tag is included in the GHSA advisory, so the technique is publicly documented.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 19, 2026

Unauthenticated remote attackers who can influence reStructuredText that django-docutils renders (versions up to and including 0.29.0) can read local files readable by the Django worker process, cause server-side requests to attacker-chosen URLs, and inject stored HTML/JavaScript into rendered output, matching the CVSS 3.1 score of 8.2 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N). The exposure is conditional: a site is only exploitable if it renders lower-trust or attacker-influenced RST through a vulnerable public path - publish_doctree, publish_html_from_source, publish_html_from_doctree, publish_parts_from_doctree, the {% rst %} tag, the rst filter, DocutilsTemplates, or DocutilsView - using default configuration; applications that render only trusted static RST are not affected unless that content can be influenced. The vendor advisory ships a minimal public proof-of-concept harness that demonstrates the include directive expanding server-side and the raw directive emitting unescaped HTML on 0.28.0/0.29.0, but there is no indication of confirmed active exploitation (not in CISA KEV), and the current priority signal is 'this_week' rather than emergency.

RemediationAI

Vendor-released patch: upgrade to django-docutils 0.30.0 (fixed versions >= 0.30.0), and be aware that 0.30.0 has an undeclared runtime dependency on typing-extensions, which should be installed alongside it if your environment does not already provide it (tracked separately as a packaging fix). Upgrading is the only complete fix: 0.30.0 disables file insertion, raw directives, ambient docutils.conf processing and unsafe URI schemes by default across all public rendering helpers, and sanitizes doctrees after all writer transforms so a transform cannot reintroduce unsafe markup, additionally removing http-equiv=refresh meta directives. If trusted static RST intentionally depends on '.. include::', '.. raw::', local docutils.conf or unsafe URI schemes, opt in explicitly with DJANGO_DOCUTILS_LIB_RST = {'allow_unsafe_docutils_settings': True, 'docutils': {'raw_enabled': True, 'file_insertion_enabled': True, '_disable_config': False}} - and never enable those settings for comments, profile text, CMS fields, uploaded files, or API request data. Where upgrading is not immediately possible, applications can supply their own safe Docutils configuration (file_insertion_enabled=False, raw_enabled=False, _disable_config=True) and sanitize doctrees, at the cost of breaking legitimate include/raw usage; note that escaping HTML output after rendering does not prevent the server-side file read. Vendor guidance: advisory https://github.com/tony/django-docutils/security/advisories/GHSA-86mf-q4h5-69gp, fix PR https://github.com/tony/django-docutils/pull/457 (commits 274caaf14c2368fafeb45f178094a34ba538f067 and 57fd751a10ce2969e4ca2bde6a9094fa2e2ba0dd), and the Docutils security guide at https://docutils.sourceforge.io/docs/howto/security.html.

Affected VersionsENISA

django-docutils < 0.30.0

Affected Packages

pypi django-docutils fix: 0.30.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

django-docutils is a Python/Django integration that bridges the Docutils reStructuredText parser with Django's template layer and class-based views. Docutils treats file insertion and raw pass-through as legitimate features for trusted authoring environments, so its defaults enable the '.. include::' and '.. csv-table::' directives with ':file:' and ':url:' options, '.. raw:: html' emission, and ambient lookup of a local docutils.conf - none of which are appropriate when the source text is lower-trust. Before 0.30.0 the package handed RST to Docutils without forcing the web-safe settings file_insertion_enabled=False, raw_enabled=False, and _disable_config=True, and without filtering unsafe URI schemes or sanitizing doctrees before HTML emission. The result maps onto CWE-22 as the primary classification (path traversal via server-side file inclusion), with the advisory additionally tagging CWE-79 (raw HTML/script injection), CWE-200 (exposure of configuration, environment files, credentials, templates, mounted secrets and logs), and CWE-918 (server-side request forgery through URL-backed directives). Because the file read happens server-side before any HTML reaches the browser, escaping the rendered output client-side does not mitigate the disclosure. The 0.30.0 fix disables file insertion, raw directives, local docutils.conf processing and unsafe URI schemes by default, and runs sanitization (sanitize_doctree / SanitizeTransform) after all writer transforms so a later transform cannot reintroduce unsafe markup; it also strips raw nodes and http-equiv=refresh meta directives. The trigger conditions above are documented by the vendor; where a particular deployment's view subclass, settings override, or RST source is not described in the available sources, its behavior is unverified.

Know when Django 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 (GitHub_M) PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
vuln.today AI 8.2 HIGH

Attacker-supplied RST reaching a default-config rendering path triggers server-side file read (C:H) and stored HTML/XSS injection (I:L) over the network with no privileges or interaction; no availability impact.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 18:19 EUVD
CVE Published
Nov 19, 2026 - 16:43 cve.org
HIGH 8.2

DescriptionCVE.org

django-docutils provides reStructuredText support for Django. Prior to 0.30.0, public rendering paths including 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 pass lower-trust reStructuredText to Docutils without disabling file_insertion_enabled, raw_enabled, 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.

Technical POC Analysis

CWE-22 (path traversal / improper limitation of a pathname to a restricted directory) is the headline classification in the CVE record; the same defect is also tagged CWE-79, CWE-200, and CWE-918 bec…

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-59988 in django-docutils (up to 0.29.0) allows unauthenticated attackers to read local files, make server-side requests, and inject stored HTML/JavaScript if the application renders untrusted reStructuredText through vulnerable paths. This exposes sensitive data and creates cross-site scripting risks, impacting customers and compliance. Leadership should prioritize mitigation because the flaw is remotely exploitable without credentials and a public proof-of-concept exists, though no active exploitation has been confirmed.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict rendering of untrusted reStructuredText; sanitize RST input to disallow include and raw directives; enforce strict file system permissions for the Django worker process; deploy a web application firewall to filter malicious requests; disable vulnerable endpoints until a patch is available.

Threat Intelligence Overview

EPSS Score
0.4%
Top 61% exploitable
Prevalence
Low
niche single-maintainer Django add-on, limited PyPI adoption
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

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 HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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