arXiv:2610.22301cs.CROct 2026

Manuscript Offprint

arXiv:2610.22301

My Credentials, Please: Detecting Filesystem Capability Laundering in MCP Servers at Scale

Zeqian Huang, Mingyue Tang, Aonan Guan, Qiming Sun, Pengzhou He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zeqian Huang 1^{1}, Mingyue Tang 2^{2}, Aonan Guan 3^{3}, Qiming Sun 4^{4}, and Pengzhou He ∗5^{*5}

1^{1} Independent Researcher

leilahuang95@gmail.com

2^{2} University of Illinois Urbana-Champaign, Urbana, IL, USA

mt55@illinois.edu

3^{3} Independent Researcher

guanaonan@gmail.com

4^{4} Santa Clara University, Santa Clara, CA, USA

qsun4@scu.edu

5^{5} Auburn University at Montgomery, Montgomery, AL, USA

phe@aum.edu

Abstract. The Model Context Protocol (MCP) standardizes how AI agents invoke external tools. MCP servers expose tools through a declared contract consisting of a name, description, and argument schema. In typical local deployments, client-side approval of a tool call grants the underlying server process broad host filesystem permissions rather than restricting it to the declared operation. We study the resulting vulnerability class, filesystem capability laundering, where attacker-steered arguments cause a tool to access sensitive host files outside its declared contract and deployment scope. We analyze this capability gap across three layers: server-category screening (L1), per-tool contract analysis (L2), and bypassable path-validation checks (L3). We design MCP-FSD to catalog MCP servers, infer least-privilege boundaries per tool, plant credential fixtures outside those boundaries, and evaluate exploitability and sandbox containment via paired dynamic execution. Across 21,097 MCP servers from nine registries, 787 of 4,806 triaged servers (16.4%) exhibit filesystem capabilities despite non-filesystem functional classifications. Dynamic three-case validation confirms 150 vulnerable instances under tested sandbox policies. Coordinated disclosure yielded 13 security advisories, including two CVEs in Anthropic's Git MCP Server.

Keywords: Model Context Protocol · Filesystem Security · Sandbox · Static Analysis · AI Agent Security · Dynamic Validation · Tool-Use Security

1 Introduction

The Model Context Protocol (MCP) [17] has become the standard interface through which AI agents invoke external tools, data sources, and services. An

MCP server implements tools that a client discovers through tools/list and invokes through tools/call. The tool's name, description, and argument schema form its declared contract [28].

MCP supports client-provided filesystem roots [27], and tool definitions can include output schemas and behavioral annotations [28]. However, the MCP specification delegates per-tool filesystem enforcement entirely to individual server implementations or host environments. The security question is whether attacker-influenced arguments can steer a tool's effects beyond the scope justified by its contract and deployment context.

Path-traversal flaws are documented in the agent harness itself: Claude Code's prefix-match bypass [5] and symlink-following [4] let crafted arguments escape the harness's intended scope. For locally launched servers, the code that accesses files instead runs in a separate server process. While the client's approval prompt gates execution based on declared arguments, the spawned server process executes with ambient host filesystem permissions. An ostensibly benign operation can therefore access and expose host credentials through ordinary tool output. We call this vulnerability class filesystem capability laundering: an out-of-scope filesystem capability is exercised under the guise of an innocuous tool contract.

We examine the gap at three layers. At the server-category layer (L1), we compare inferred filesystem capability flags against the server's functional classification (primary_type). Because non-filesystem servers (e.g., memory or code development) often perform legitimate local persistence, category mismatches serve as coarse screening signals. At the tool-name layer (L2), a tool's narrow operation can reach files beyond its intended scope: git_add can stage an out-of-repository file whose contents a later diff returns (CVE-2026-27735, §5.2). At the defense-bypass layer (L3), an existing path check can be defeated: the Filesystem MCP Server's string-prefix check admitted sibling directories sharing the allowed prefix (CVE-2025-53110 [30]). Figure 1 illustrates the staging-and-diff disclosure sequence.

We build MCP-FSD (Filesystem Scope Detection), a framework that catalogs MCP servers across registries, discovers each server's tools inside per-repository sandboxes, screens candidates with MCP-aware static filters, and dynamically validates each one against an inferred least-privilege boundary. Across a catalog of 21,097 servers from nine registries, 787 of 4,806 triaged servers (16.4%) receive a filesystem capability flag without a FileSystem category label. Dynamic validation yields 150 adjudicated instances under tested policies. We select 13 additional findings for coordinated disclosure and document two Git MCP Server CVEs (§5).

We make three contributions:

– We characterize and formalize how attacker-influenced MCP tool arguments expose filesystem capabilities beyond a tool’s contract and deployment scope.

– We design MCP-FSD to connect source screening and inferred per-tool boundaries to executable evidence, evaluating exploitability, benign operability, and sandbox containment across three complementary dynamic validation cases.

– We measure ecosystem-scale screening signals, confirm 150 vulnerable instances through dynamic validation under tested sandbox policies, and present Git case studies showing how repository operations expose host credentials.

We evaluate these contributions through five research questions ( §4§4). RQ1: how frequent are screening signals, and what evidence supports them? RQ2: how many candidates survive three-case dynamic validation? RQ3: what were the outcomes of coordinated disclosure? RQ4: how do violations distribute over language, registry, and tool category? RQ5: how often does a confirmed instance need a format-wrapped payload rather than a bare traversal string?

References (32)