SMG Group · Research June 23, 2026

AI Security

Credential Handling in AI Browser Agents

Query

When Browser Use or Playwright MCP automates a login to a sensitive account, where can the password, the MFA code, or the logged-in session end up, and what controls are needed before using it in production?

Research and testing

  • Reviewed GitHub issues on credential exposure in Playwright MCP (#1566) and Browser Use (#713, #1907).
  • Reviewed Browser Use's documentation on sensitive data, web authentication, and cloud profile sync.
  • Reviewed MFA guidance for automated agents (WorkOS, BankInfoSecurity) and Cloudflare Browser Run's human-in-the-loop feature.
  • Reviewed security research: arXiv 2505.13076, arXiv 2604.03070, the OWASP LLM Top 10 (2025), and Obsidian Security.
  • This was a review of 12 primary sources. No logins were tested.

Methodology

Each finding was traced to a primary source (an issue thread, official documentation, or a paper) and rated by severity for automated logins to sensitive accounts.

Results

  1. Playwright MCP sent passwords to the model (critical). Its accessibility snapshot included the live value of password fields, so a typed password reached the cloud model in plain text (issue #1566, April 2026). The issue is closed, but the thread doesn't say how it was fixed. Check the installed version before using it on a login form.
  2. Browser Use's sensitive_data works only when fully configured (high). With domain pinning (allowed_domains), the model sees only placeholder names such as x_user and x_pass, and real values are typed in after it responds. Two bugs undercut this: controller logs printed the real values (issue #713, fixed in PR #724), and some versions typed the placeholder name instead of the password (issue #1907). It holds only when domains are pinned, vision is off, and both fixes are installed.
  3. MFA (medium). Authenticator-app (TOTP) codes can be automated by giving the agent the TOTP secret, which Browser Use keeps from the model. SMS codes, push approvals, and hardware keys can't be automated. They need a person, or a saved session that has already passed MFA.
  4. A cloud model receives the page on every step (critical). The accessibility tree, screenshots in vision mode, the page title and URL, and the task history all go to the provider. Any personal or account data on screen goes with them. A local model through Ollama keeps all of this on the machine, at some cost in capability.
  5. Browser Use Cloud profile sync uploads live sessions (high). It copies the full Chrome profile, including cookies, saved passwords, and active logged-in sessions, to Browser Use's servers.
  6. Prompt injection (high). Text an attacker controls on a page the agent reads, such as a message or a profile field, can redirect a logged-in agent (arXiv 2505.13076; OWASP lists prompt injection and excessive agency as top risks). Obsidian Security reported a case where hidden instructions in an email led an AI assistant to approve $2.3 million in fraudulent wire transfers.
  7. Leaks through agent skills (informational). A study of agent skill repositories (arXiv 2604.03070) found credentials exposed in documentation, example inputs, error messages, and config files.

Minimum controls for production use

  • Log in once by hand and reuse the saved session (storage_state), so no password or MFA code passes through the automation.
  • Run a local model.
  • If a cloud model is used, turn vision off on login and account pages.
  • Use sensitive_data with allowed_domains; Browser Use raises an error if domains are missing.
  • Pin Playwright MCP to a version that includes the #1566 fix.
  • Never use cloud profile sync for sensitive sessions.
  • Run read-only tasks and anything that can make a payment or change an account in separate sessions.
  • Refresh session cookies before each run.

Sources

  1. microsoft/playwright-mcp #1566: password serialized in aria snapshot (April 2026)
  2. browser-use #713: sensitive data exposed in controller logs (February 2025)
  3. Browser Use: sensitive data documentation
  4. Browser Use: web agent authentication
  5. browser-use #1907: credential key/value substitution bug
  6. arXiv 2505.13076: The Hidden Dangers of Browsing AI Agents (May 2025)
  7. arXiv 2604.03070: Credential leakage in LLM agent skills (April 2026)
  8. WorkOS: MFA for AI agents
  9. BankInfoSecurity: The MFA illusion for non-human agents
  10. Cloudflare: Browser Run human-in-the-loop
  11. Obsidian Security: Security for AI agents
  12. OWASP LLM Top 10 (2025), summary