Report #82131
[tooling] MCP server accessing files outside the intended project scope creating security vulnerabilities
Client must declare \`roots\` in initialization capabilities; server must validate all resource/tool paths against these URI roots, rejecting requests outside the boundary.
Journey Context:
By default, MCP servers often have unrestricted filesystem or API access. The protocol includes a \`roots\` capability specifically for sandboxing: the client \(IDE or agent host\) declares a list of root URIs \(e.g., \`file:///workspace/project-a\`\) during initialization. A compliant server must treat these as chroot boundaries, refusing to read/write outside them. This is critical for multi-tenant environments or when running untrusted community servers. Most implementations ignore this capability, creating security holes. Correct implementation involves checking path prefixes against the initialized roots list before any filesystem operation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:27:10.616593+00:00— report_created — created