Skip to content

AAK-MCP-BROWSER-ATTACH-001: A browser-automation MCP server can reach the user's own browser

Severity
MEDIUM
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_browser_attach.py
Auto-fixable
No.
SARIF name
McpBrowserAttachesToUserBrowser

What it detects

A browser-automation MCP server in a config attaches over CDP to a browser on this machine (--cdp-endpoint, --browserUrl, --wsEndpoint, --remote-debugging-port, connectOverCDP, cdpUrl), attaches to the running browser (--autoConnect, --extension), points --user-data-dir at the real profile, imports cookies, or turns off the renderer sandbox with --no-sandbox. The model then holds every session that browser is signed in to, and a page it opens can read them through the agent. A hosted browser, a profile of its own and --isolated do not fire.

How to fix

Give the server a browser of its own: --isolated, or a profile directory used for nothing else, and no CDP attach to the browser you browse with. If you do need to attach, start that browser with a throwaway profile. Remove --no-sandbox outside a container.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-BROWSER-ATTACH-001

Limitations

Reads args and env of JSON MCP configs, for the flags Playwright MCP and chrome-devtools-mcp document. A server's own --config file is not read. A CDP endpoint counts only on this machine (loopback, host.docker.internal, a bare port), so a browser on another host on your network is not reported, and neither is a hosted one. --extension, --autoConnect, a cookie flag and --no-sandbox count only on a server whose name or launch words say browser, playwright, puppeteer, chrome, chromium, cdp, selenium, devtools or stagehand. --no-sandbox under docker, podman or nerdctl is left out, since a container often needs it. --user-data-dir counts only for the default profile paths of Chrome, Chromium, Brave, Edge and Firefox on macOS, Linux and Windows, so a copy of a profile elsewhere is missed. --storage-state counts only when its path says cookie. In env, the names read are CDP_URL, CDP_ENDPOINT, BROWSER_URL, WS_ENDPOINT, USER_DATA_DIR and NO_SANDBOX, with any prefix. Configs outside the project are not read.

References

  • OWASP MCP Top 10: MCP02:2025 (Privilege Escalation via Scope Creep)
  • OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-01 (Missing Authentication)

All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-BROWSER-ATTACH-001.md: the page then shows that text, with the registry reference appended under it.