T05 · Unauthorized Access and Privilege Escalation
- Location
agents/openai.yaml:6- Finding
Full-Catalog MCP Endpoint Violates Least-Privilege Requirements
- Content
View full analysis
Vulnerability Details
File Location:
agents/openai.yaml:6-11
Vulnerability Type: Excessive MCP tool privileges
Risk Level: MediumVulnerable Code
yaml dependencies: tools: - type: "mcp" value: "mermail" description: "Mermail workspace and mailbox MCP server" transport: "streamable_http" url: "https://console.mermail.app/mcp"Technical Analysis
The agent configuration connects to Mermail's unrestricted
/mcpendpoint. According toreferences/tools.md, that endpoint exposes the full tool catalog, whereas the dedicated/mcp?profile=agent-inboxendpoint exposes only the 12 operations required for mailbox discovery, provisioning, and bounded email inspection.This configuration conflicts with the Skill's own least-privilege design. Although the instructions tell the model to self-restrict its tool usage, an instruction-level restriction is weaker than server-side tool exclusion. Tool-selection errors, prompt injection from untrusted email, or failures in host enforcement could therefore reach unrelated operations in the full Mermail catalog.
Attack Path
- The host loads the Skill and establishes the configured connection to
https://console.mermail.app/mcp. - The unrestricted endpoint makes the full Mermail tool catalog available to the agent.
- The agent processes attacker-controlled email metadata or content during the inbox workflow.
- Prompt injection, model error, or inadequate host isolation influences tool selection.
- The agent invokes an unrelated full-catalog operation that would not have been exposed by the dedicated
agent-inboxprofile.
This path depends on a tool-selection or policy-enforcement failure; the project otherwise contains explicit instructions to treat inbound email as untrusted.
Impact Assessment
The agent could exercise Mermail capabilities beyond the legitimate requirements of creating or reusing a ...[truncated 488 chars]
- The host loads the Skill and establishes the configured connection to
- Remediation
View remediation
Remediation Suggestions
-
Replace the full-catalog URL with the dedicated least-privilege profile:
yaml dependencies: tools: - type: "mcp" value: "mermail" description: "Mermail workspace and mailbox MCP server" transport: "streamable_http" url: "https://console.mermail.app/mcp?profile=agent-inbox" -
Enforce a host-side allowlist containing only the 12 documented tools:
get_api_credit_usagelist_workspacesget_workspacelist_email_domainslist_workspace_mailboxeslist_mailboxescreate_mailboxget_mailboxlist_emailssearch_emailsget_emailget_email_context
-
Do not rely exclusively on natural-language instructions to prevent access to unrelated tools. Apply the restriction at both the server profile and host authorization layers.
-
Add a configuration test that fails if the packaged agent endpoint is
/mcpwithout theprofile=agent-inboxquery parameter. -
Retain the existing safeguards for scan-gated reads, bounded content, prompt-injection handling, and fresh approval before using OTPs or magic links.
-
