AccuroAI
Book a demo

Resources / MCP Server Risk Directory / Playwright MCP

Is the Playwright MCP safe? Risks, permissions and safe setup

Developers and QA teams letting agents drive a real browser to test web apps, fill forms and scrape pages. Here is what an AI agent can do through it, its published vulnerabilities and how to set it up safely.

Baseline risk

60High
  • Capabilities: 40 of 40
  • Read-plus-exfiltrate: +20
  • Hidden instructions (publicly verified): none known
  • Third-party publisher: no (official)

Before your own factors: version pinning, number of users and policy coverage. How we score

Maker
Microsoft
Publisher
Official (published by the maker)
Runs
Local (runs on the device)
Transport
stdio, streamable-http, sse
Authentication
none (local process permissions); the browser uses whatever profile, cookies or --storage-state it is given
Tools
72
Built-in limits
--caps opt-in groups (vision, pdf, devtools, network, storage, config, testing); 25 tools on by default; --allowed-origins / --blocked-origins (not a security boundary); --isolated; file access limited to workspace roots unless --allow-unrestricted-file-access; no read-only mode
License
Apache-2.0
Source
github.com/microsoft/playwright-mcp
Last verified
2026-11-23

What an agent can do through it

Automates a browser · 10Fetches arbitrary URLs · 15Reads local files · 5Runs code or commands · 15
ToolTypeWhat it does
browser_navigateNetworkNavigates to any URL (file:// blocked by default)
browser_snapshotReadReturns the page's accessibility snapshot, including any logged-in content
browser_typeSendTypes text into page elements, which can submit data to any site
browser_fill_formSendFills multiple form fields
browser_evaluateExecuteRuns JavaScript on the page or an element
browser_run_code_unsafeExecuteRuns arbitrary JavaScript in the Playwright server process; the README calls it RCE-equivalent
browser_file_uploadReadUploads local files by absolute path (workspace roots only by default)
browser_network_requestsReadLists network requests since page load and can save them to a file
browser_cookie_getReadReads cookies (caps=storage)

Read-plus-exfiltrate: this server can both read sensitive data and send data out, so a single prompt injection in content the agent reads could move private data to an outside party without any other server involved.

Known vulnerabilities

IDIssuePublishedFixed in
CVE-2025-9611 / GHSA-8rgw-6xp9-2fg3
High (CVSS 4.0 7.2)
Microsoft Playwright MCP Server DNS rebinding via missing Origin header validation Affected: @playwright/mcp < 0.0.40.2026-01-070.0.40

Main risks

Web pages inject instructions through snapshots

LLM01:2025 Prompt Injection

browser_snapshot returns page text from any site the agent visits, including hidden text written for the model. Injected instructions can direct the agent to other tabs, forms or tools.

Logged-in sessions leak to attacker sites

LLM02:2025 Sensitive Information Disclosure

With a persistent profile or --storage-state, the agent can read email, dashboards or admin pages and then type or navigate that data to any origin. The README says --allowed-origins is not a security boundary and does not affect redirects.

Arbitrary code in the server process

ASI05 Unexpected Code Execution

browser_run_code_unsafe is a default core tool and runs arbitrary JavaScript in the Playwright server process, which the README calls RCE-equivalent. A hijacked agent can use it to reach the host.

Local HTTP server reachable from malicious sites

ASI02 Tool Misuse and Exploitation

CVE-2025-9611 let a website use DNS rebinding to call tools on a local Playwright MCP HTTP server before 0.0.40. Binding --host 0.0.0.0 or setting --allowed-hosts to * widens exposure further.

Unpinned @latest install

ASI04 Agentic Supply Chain Vulnerabilities

The official config runs npx @playwright/mcp@latest, so each start can run new code. A compromised release would reach every user on the next launch.

How to set it up safely

  1. Pin @playwright/mcp to a reviewed version at or above 0.0.40 instead of @latest.
  2. Run with --isolated so each session uses an in-memory profile, and avoid --user-data-dir pointing at your real browser profile.
  3. Pass --storage-state only for test accounts, never for personal or admin sessions.
  4. Use --allowed-origins and --blocked-origins to narrow sites, while treating them as guardrails, not a boundary.
  5. Keep the default workspace-root file limit; do not use --allow-unrestricted-file-access.
  6. Enable only the --caps groups you need; leave storage and network off unless required.
  7. In HTTP mode keep --host on localhost and do not set --allowed-hosts to *.
  8. Do not use --no-sandbox, and run the Docker headless image for untrusted browsing.

How we score

Baseline scores use the method from our guide to scoring every MCP server on employee laptops. Score the servers in your own environment with the free MCP Server Risk Checklist.

1. What the server can do (capped at 40)

  • Sends messages externally: 15
  • Fetches arbitrary URLs: 15
  • Writes to code repositories: 15
  • Reads and writes databases: 15
  • Writes or deletes local files: 10
  • Automates a browser: 10
  • Reads and writes SaaS data: 10
  • Reads local files: 5
  • Runs code or commands: 15 (added for this directory)
  • Changes cloud infrastructure: 15 (added for this directory)
  • Moves money or changes payments: 15 (added for this directory)

2. What we found

  • Read-plus-exfiltrate: reads sensitive data and can also send data out: 20
  • Hidden instructions in a tool description (publicly verified): 30, and always Critical
  • Third-party: not published by the maker of the system it connects to: 10

3. Band

0–24 Low · 25–49 Medium · 50–74 High · 75–100 Critical.

This is a baseline. The full method also adds points for unpinned package versions, how many employees use the server and whether a policy covers it; those depend on your setup, so check them in your own environment.

How AccuroAI helps

The AccuroAI Endpoint Agent finds the MCP servers configured in AI clients on managed devices and lists the tools each local server exposes. Each server gets a risk level with its capabilities, and you can block a server once in the console to enforce the block on every device: Claude Code and Cursor refuse calls to it, and for other clients the agent stops the server process. Tool calls from coding agents can be graded by risk, then allowed, confirmed with the employee or blocked.

MCP security · MCP server inventory · How to red team an MCP server

Questions about the Playwright MCP

Is the Playwright MCP safe to use?

It can be, with the right setup. At baseline it scores 60 (High) in the AccuroAI method because an agent using it can automates a browser, fetches arbitrary urls, reads local files. Limit its scopes or tools, keep a person in the loop for write actions and pin the version you reviewed.

Does the Playwright MCP have known vulnerabilities?

Yes. 1 published issue is listed on this page with the affected versions and the fix, as of 2026-11-23. Update to a fixed version and check the maker's advisories before approving a new release.

How do I restrict the Playwright MCP?

Use the controls the maker provides: --caps opt-in groups (vision, pdf, devtools, network, storage, config, testing); 25 tools on by default; --allowed-origins / --blocked-origins (not a security boundary); --isolated; file access limited to workspace roots unless --allow-unrestricted-file-access; no read-only mode. Then grant the narrowest token or account, approve the server centrally and block other copies of it.

Related servers

Chrome DevTools MCP · Fetch MCP Server (mcp-server-fetch) · All servers

Sources

Facts were verified on 2026-11-23 against the server’s own repository and documentation and public vulnerability records. Servers change often: check the maker’s latest release notes before approving a new version. This page is general security guidance, not a guarantee about any product.

MCP Security
Find every copy of Playwright MCP on your fleet

AccuroAI finds the MCP servers configured in AI clients on managed devices, gives each a risk level and blocks a server across the fleet.

Book a demoStart a free pilot

Finds MCP servers on managed devices · Risk level per server · Block a server across the fleet