Give Them an Inch and They Will Take a Mile:Understanding and Measuring Caller Identity Confusion in MCP-Based AI Systems

Yuhang Huang, Boyang Ma, Biwei Yan, Xuelong Dai, Yechao Zhang, Minghui Xu, Kaidi Xu, Yue Zhang

TL;DR

Researchers have uncovered a systemic vulnerability in the Model Context Protocol (MCP)—the emerging "USB-C of AI applications"—which they term Caller Identity Confusion. By analyzing over 6,000 real-world MCP servers, they found that 46.4% allow unauthorized callers to "piggyback" on previously established credentials, leading to risks like Remote Code Execution (RCE) and silent API abuse.

What Problem Does This Paper Address?

As LLM agents move from answering questions to taking actions, they rely on middleware like the Model Context Protocol (MCP) to interact with databases, local shells, and web APIs. MCP decouples the "reasoning" (the LLM) from the "execution" (the MCP server).

The core issue is a mismatch in trust assumptions. Traditional web services use sessions and tokens to track who is making a request. However, MCP servers often operate under the assumption that they are serving a single, trusted user. To improve usability, many servers cache authorization states (like an OAuth token or a logged-in session).

The authors identify Caller Identity Confusion: if an MCP server is shared across different agents or accessible over a network, it cannot distinguish between a legitimate user and an attacker. Once the "inch" of authorization is granted by a real user, the server "takes a mile" by allowing any subsequent caller to use that same privileged state without re-authentication.

Methods

The authors developed MCPAuthChecker, a framework designed to detect these vulnerabilities through a three-phase pipeline:

  1. Execution-Triggered Tool Entry Resolution: Unlike standard code, MCP tools are often registered dynamically (e.g., via decorators or runtime lists). The tool uses CodeQL to perform static analysis, identifying exactly where a protocol-level request enters the actual executable code.
  2. Path-Sensitive Authorization Analysis: The framework traces the control flow from the entry point to "sensitive operations" (like file writes or system calls). It checks if authorization is explicitly enforced along that specific path or if it relies on a global, cached state.
  3. Selective Dynamic Validation: To confirm findings, the authors used a proxy (mcp-remote) to interact with live servers. They tested whether a tool would successfully execute a sensitive action under an existing authorization state without triggering a new prompt for the caller.

Datasets

The study performed a large-scale measurement using:

  • 6,137 real-world MCP server projects implemented in Python and JavaScript/TypeScript.
  • Data was sourced from MCPCollection and MCPZoo, representing the current state of the MCP ecosystem.
  • The servers were categorized into functional domains such as Developer Tools, Data Science & AI, and Cloud Infrastructure.

Key Insights and Ideas

  • The "Convenience Trap": The vulnerability isn't a bug in the MCP specification itself, but a consequence of how developers implement it. Caching credentials makes for a smoother user experience but creates a "long-lived execution proxy" for attackers.
  • Developer Tools are the Primary Target: Servers in the "Developer Tools" category were the most prevalent and the most vulnerable (52% insecure). These often include high-risk capabilities like shell access or git integration.
  • Popularity is No Shield: The researchers found that "highly starred" GitHub projects were just as likely to exhibit insecure authorization patterns as obscure ones. Security maturity has not yet caught up with the rapid adoption of the protocol.
  • Implicit Trust is Broken: In an MCP environment, the "caller" is often a stateless LLM. Because the protocol lacks a standardized way to bind a user's identity to a specific tool call, the server has no reliable way to verify the source of the request.

Key Results

  • Pervasive Vulnerability: 46.4% (2,846) of the analyzed servers were found to be vulnerable to identity confusion.
  • High Impact Attacks: The authors demonstrated three "real-world" attack vectors:
  • RCE via Git: Exploiting a vulnerable git-mcp server to execute arbitrary shell commands.
  • GUI Hijacking: Using browser-control tools (like Puppeteer) to silently capture screens or bypass CAPTCHAs.
  • API Abuse: Piggybacking on Slack or AWS credentials to exfiltrate data or incur costs.
  • Tool Effectiveness: MCPAuthChecker achieved high precision, with a recall rate of over 94% for identifying tools and detecting authorization flaws across both Python and JS/TS.

Limitations and Future Work

The authors acknowledge that their static analysis via CodeQL can be computationally expensive, with analysis times increasing significantly for projects exceeding 3,000 lines of code. Additionally, while the paper identifies the problem, the "fix" requires a shift in the ecosystem toward per-connection session isolation—a design pattern the authors propose in the appendix but which is not yet standard.

Future work may involve developing protocol-level extensions for MCP that natively support identity binding, ensuring that LLM-mediated interactions are as secure as traditional web architectures.

Summary updated

Abstract

The Model Context Protocol (MCP) is an open and standardized interface that enables large language models (LLMs) to interact with external tools and services, and is increasingly adopted by AI agents. However, the security of MCP-based systems remains largely unexplored.In this work, we conduct a large-scale security analysis of MCP servers integrated within MCP clients. We show that treating MCP servers as trusted entities without authenticating the caller identity is fundamentally insecure. Since MCP servers often cannot distinguish who is invoking a request, a single authorization decision may implicitly grant access to multiple, potentially untrusted callers.Our empirical study reveals that most MCP servers rely on persistent authorization states, allowing tool invocations after an initial authorization without re-authentication, regardless of the caller. In addition, many MCP servers fail to enforce authentication at the per-tool level, enabling unauthorized access to sensitive operations.These findings demonstrate that one-time authorization and server-level trust significantly expand the attack surface of MCP-based systems, highlighting the need for explicit caller authentication and fine-grained authorization mechanisms.
BibTeX
@misc{huang2026give,
  author = {Yuhang Huang and Boyang Ma and Biwei Yan and Xuelong Dai and Yechao Zhang and Minghui Xu and Kaidi Xu and Yue Zhang},
  title = {{Give Them an Inch and They Will Take a Mile:Understanding and Measuring Caller Identity Confusion in MCP-Based AI Systems}},
  year = {2026},
  eprint = {2603.07473},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.07473},
}

Loading related content...

Figure