Skip to main content

MCP-003 Overbroad filesystem root

An MCP filesystem server gives the model read and write reach over the directory it is mounted at. Mounted at $HOME it exposes .ssh, .gnupg, browser profiles and token caches; mounted at / it exposes everything the host can reach. One prompt injection then turns "can read files" into "can exfiltrate everything".

What Vulkro detects​

A filesystem-class MCP server whose path argument falls in one of two classes:

ClassPathsSeverityConfidenceWeight
Root/, $HOME, ~, ${HOME}, /Users/<name>, /home/<name>HighHigh0.8, Pattern
Shallowone segment under home (~/Documents, $HOME/work) or root (/tmp, /var)MediumMedium0.5, Heuristic

Filesystem-class servers are recognised by a package name containing server-filesystem, filesystem-server, mcp-server-fs or server-fs. Other servers are skipped, since their path arguments are often config files.

Paths are classified by their literal text; ~ is not expanded. Evidence signal: mcp-server-overbroad-fs-root.

Non-compliant code​

{
"mcpServers": {
"fs-home": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem@2025.5.0", "$HOME"]
},
"fs-shallow": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem@2025.5.0", "~/Documents"]
}
}
}

Compliant code​

{
"mcpServers": {
"fs": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem@2025.5.0", "/Users/me/work/this-project"]
}
}
}

How to fix​

  • Mount the smallest directory the model needs; ~/work/<project> is almost always right, ~ and / almost never.
  • For several projects, declare one server entry per project instead of mounting ~/work. Paths two or more segments deep count as scoped.
  • If a workflow truly needs broad reach, document that trust assumption in the host config or team setup notes.

References​

See also: vulkro mcp-audit, MCP-001, Confidence model.