How I Discovered a Rare Vulnerability in MCP Server — Bug Bounty
The MCP server integration for a multi-tenant platform did not enforce the same permission checks as the main application, allowing a low-privileged user to read all conversations and contacts in the tenant. An attacker could use the MCP tools to bypass access controls and access sensitive data.
Hey all, today I’m back with a writeup on a pretty cool and unique vulnerability I discovered during my security research journey. This was one of the famous public programs on Bugcrowd.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the MCP server was implemented as a separate trusted entity that did not inherit or enforce the user's permissions, leading to a broken access control vulnerability.
Impact
A low-privileged user could read all conversations and contacts in the tenant, and the bypass persisted even after the attacker was removed from the tenant.
What the attacker needed
A low-privileged account in the tenant; ability to connect an MCP server; knowledge of MCP setup
How it was found
- Set up the MCP client and proxy tool with the provided configuration file.
- Authorize the MCP application to the low-privileged tenant account.
- Call the 'search' tool with a query for conversations to retrieve all conversation IDs.
- Use a retrieved conversation ID to call the 'fetch' tool and read the full conversation.
- Call the 'search' tool with a query for contacts to retrieve contact details.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The platform lets users connect an AI assistant (MCP server) to their account. This assistant was supposed to follow the same permission rules as the user, but it didn't. So even a user with limited access could use the assistant to read private messages and contact details of all customers.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.