T05 · Unauthorized Access and Privilege Escalation
- Location
references/tools.md:76- Finding
Mailbox Agent Delegation Lacks Server-Enforced Capability Isolation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:39-40,references/security.md:13,references/tools.md:76, andreferences/workflows.md:46
Vulnerability Type: Excessive downstream privileges and missing per-request tool isolation
Risk Level: HighRelevant snippets:
SKILL.md:39-40markdown 7. State the task, allowed effects, prohibited effects, data bounds, and stop conditions explicitly. The chat schema has no server-enforced downstream tool-allowlist field: these are instruction boundaries, not proof that tools were removed. Follow [security.md](references/security.md) when that distinction matters. 8. Treat `chat_with_mailbox_agent` as an external effect because the downstream Assistant may save, send, schedule, discard, call Composio, or use PayBox tools. Continue only when the current user request authorizes the exact possible effect; ask again after any material change to recipients, target, account, amount, action, or scope.references/security.md:13markdown When the outer host supports capability configuration, expose only the minimum Mermail MCP tools needed for orchestration. This outer-host setting is separate from the chat request. `chat_with_mailbox_agent` itself has no server-enforced downstream tool allowlist: its allowed/prohibited action text is a prompt boundary, not capability isolation. If safety depends on technically removing a downstream capability, do not delegate; use bounded direct read tools instead.references/tools.md:76markdown The chat body has no `allowedTools`, `toolAllowlist`, or equivalent server-enforced restriction. Mermail injects its own mailbox tools plus eligible PayBox and connected Composio tools. State task and prohibited effects in the user instruction, but do not describe this as technical tool isolation.references/workflows.md:46markdown The internal mailbox Assistant may receive direct tools for active Composi ...[truncated 4168 chars]- Remediation
View remediation
Remediation Suggestions
- Add a server-enforced
allowedToolsor equivalent capability policy tochat_with_mailbox_agent. - Default every delegation to a read-only profile with no send, schedule, delete, Composio, PayBox, credential, or account-management capabilities.
- Grant each write capability only when the authenticated user’s current request explicitly authorizes that exact effect, resource, target, account, recipients, amount, and scope.
- Separate read-only and effectful delegation endpoints so mailbox summaries cannot execute writes even if prompt boundaries fail.
- Do not inject PayBox or connected-application tools into generic mailbox tasks. Require explicit routing to dedicated wallet or integration workflows.
- Preserve the existing limits on supplied mailbox content, attachment handling, secret exclusion, scan status, retries, and authoritative result verification.
- Continue routing isolation-sensitive reads to bounded direct mailbox tools until server-side capability restriction is implemented.
- Enforce downstream authorization independently of model-generated arguments, including recipient, account, destination, amount, and operation validation immediately before tool execution.
- Record and expose an auditable list of capabilities granted to each delegated turn so the outer orchestrator and user can verify the effective privilege set.
- Add adversarial tests in which email content requests sends, secret disclosure, connected-app actions, or payments, and verify that unavailable capabilities are rejected by the server rather than merely declined by the model.
- Add a server-enforced
