LOWCVSS v3.1 3.3Vulnerability

CVE-2026-113731

### Affected version / file / line Version: djust v1.1.4 (latest release, published 2026-09-23). File: python/djust/mcp/server.py:354-433 (MCP tool find_handlers_for_template). Confirmed identical on the commit used for triage, a7e4fafd1667b4db0b1465652d4a63cb17117a07. ### Description ``` @mcp.tool() def find_handlers_for_template(template_path: str) -> str: """ Args: template_path: Either a logical template name (e.g. 'demos/counter.html' — what you'd pass to `render`) OR an absolute filesystem path. Both are searched. """ ... resolved_path: str | None = None if os.path.isabs(template_path) and os.path.isfile(template_path): resolved_path = template_path else: ... # logical-name resolution via Django's template loader ... with open(resolved_path, "r", encoding="utf-8", errors="replace") as f: source = f.read() handler_names_in_template = sorted({m.group(2) for m in dj_event_attr_re.finditer(source)}) ``` When template_path is an absolute path to an existing file, it is used directly, with no confinement to the project/template directories — no realpath() + prefix check, no allowlist. open(resolved_path, ...) then reads the file. This is inconsistent with the sibling tool in the same file (loaddata, ~line 290-303), which explicitly rejects paths outside the project directory for its own path-like parameter: ``` candidate = os.path.realpath(...) if base_dir and not candidate.startswith(os.path.realpath(str(base_dir))): return json.dumps({"error": f"fixture path '{p}' resolves outside the project directory", ...}) ``` find_handlers_for_template has no equivalent check for template_path before the open() call. ### Impact An MCP client with access to this tool (available whenever the Django project is running the MCP server via python manage.py djust_mcp — no separate opt-in flag gates this specific tool beyond that) can read the contents of any file on disk that the

Properties

Summary
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
Severity
low
Nvd fetched at
2026-10-22T22:14:18.200859+00:00
Epss score
0.00164
Cvss severity
LOW
Cvss score
3.3
Retrieved at
2026-10-22T22:17:33+00:00
Ghsa published
2026-10-21T17:21:15Z
Source url
https://github.com/advisories/GHSA-r57g-mc79-8hj2
Ghsa updated
2026-10-21T17:21:16Z
Ghsa id
GHSA-r57g-mc79-8hj2
Last source
FIRST EPSS
Score
3.3
Cvss version
3.1
Cve id
CVE-2026-113731
Cvss vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
First seen by Signal
2026-10-21T17:40:10+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Published at
2026-10-20T22:19:30.197

Related Entities (3)

AFFECTS (1)

→[Software]pip/djust

VULNERABLE_TO (1)

←[Software]pip/djust

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-113731 (CVSS v3.1 3.3) — Ninja Signal Threat Intelligence | Ninja Signal