Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-113731 Overview
CVE-2026-113731 is a path traversal vulnerability [CWE-22] in djust, a library that provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. The find_handlers_for_template Model Context Protocol (MCP) tool in python/djust/mcp/server.py accepts an absolute template_path and reads it without restricting the resolved path to the project or configured template directories. A local MCP client can abuse the tool as a file existence and readability oracle. Attackers can also extract substrings matching djust attribute patterns from any file readable by the djust process. Affected versions are 0.9.0 through those preceding 1.0.10, 1.1.7, 1.2.4, and 1.3.0rc8.
Critical Impact
A local MCP client sharing the djust process user context can enumerate arbitrary files and extract limited substrings matching djust event handler attribute patterns.
Affected Products
- djust 0.9.0 through versions prior to 1.0.10
- djust 1.1.x prior to 1.1.7 and 1.2.x prior to 1.2.4
- djust 1.3.0 release candidates prior to 1.3.0rc8
Discovery Timeline
- 2026-10-20 - CVE-2026-113731 published to the National Vulnerability Database (NVD)
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-113731
Vulnerability Analysis
The vulnerability resides in the find_handlers_for_template MCP tool implemented in python/djust/mcp/server.py. The tool is designed to help clients discover Django template handlers tied to djust reactive attributes such as dj-click, dj-submit, dj-change, dj-input, dj-keydown, and dj-keyup. However, the tool accepts an absolute template_path parameter and opens the file without validating that the resolved path falls within the project root or configured template directories.
A local MCP client can therefore pass arbitrary absolute paths. The tool's response reveals whether the file exists and is readable, functioning as an oracle. When the file contains strings matching djust attribute patterns, those matched substrings are returned to the caller. The maintainer notes that the MCP server communicates over local standard input/output as the same operating-system user and exposes no network listener, which bounds the attack surface to local actors.
Root Cause
The root cause is missing path containment. The handler accepts caller-supplied absolute paths and does not canonicalize or validate the resolved location against an allowlist of trusted template directories. This is a classic improper limitation of a pathname to a restricted directory issue tracked under [CWE-22].
Attack Vector
Exploitation requires local access as an MCP client running under the same user as the djust process. The attacker invokes the find_handlers_for_template tool with an absolute path to a target file. The response confirms readability and may leak attribute-pattern substrings from the file contents. Because the tool does not return arbitrary raw file bytes, data disclosure is limited to pattern-matching output.
Detection Methods for CVE-2026-113731
Indicators of Compromise
- MCP tool invocations of find_handlers_for_template containing absolute paths that resolve outside the project root or configured template directories.
- Repeated calls to the tool with paths targeting sensitive locations such as /etc/, user home directories, or configuration files.
- Unexpected MCP client sessions spawning under the djust process user.
Detection Strategies
- Inspect djust and MCP server logs for template_path arguments that use absolute paths outside the expected template roots.
- Audit process trees to identify unauthorized MCP clients communicating with the djust server over local stdio.
- Compare installed djust versions against the fixed releases to flag vulnerable deployments.
Monitoring Recommendations
- Enable verbose logging for MCP tool invocations and retain argument metadata for forensic review.
- Monitor file access patterns from the djust process user for reads outside the application and template directories.
- Alert on installation or downgrade of djust packages to versions in the affected range.
How to Mitigate CVE-2026-113731
Immediate Actions Required
- Upgrade djust to a fixed version: 1.0.10, 1.1.7, 1.2.4, or 1.3.0rc8.
- Restrict which local users and processes can connect to the djust MCP server over stdio.
- Review MCP client configurations to ensure only trusted tools and agents can invoke djust tools.
Patch Information
The maintainers released fixes in djust 1.0.10, 1.1.7, 1.2.4, and 1.3.0rc8. Patch commits are available on GitHub, including commit 45a5045, commit 744bccf, commit 85eed7c, and commit a62caf6. Full details are documented in GitHub Security Advisory GHSA-r57g-mc79-8hj2.
Workarounds
- Disable the djust MCP server in production environments where it is not required.
- Run the djust process under a dedicated low-privilege user with minimal filesystem read permissions.
- Isolate development hosts that run MCP tooling from shared or multi-user systems until upgrades are applied.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

