Skip to content

Commit 6af0c50

Browse files
authored
Add GHSA-fhw2-h46x-v2mj: Arbitrary local file disclosure in @playwright/mcp
1 parent 08dc98f commit 6af0c50

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-fhw2-h46x-v2mj",
4+
"modified": "2026-04-27T00:00:00Z",
5+
"published": "2026-04-21T00:00:00Z",
6+
"aliases": [],
7+
"summary": "Arbitrary local file disclosure in Playwright MCP via unrestricted browser_file_upload tool",
8+
"details": "### Summary\n\nThis issue allows unintended local file exfiltration through LLM-controlled tool invocation, where sensitive files on the MCP server can be accessed and uploaded to an attacker-controlled endpoint without explicit user intent or sufficient isolation controls.\n\nPlaywright MCP exposes a `browser_file_upload` tool that accepts arbitrary absolute paths on the server's filesystem. Combined with the `browser_navigate` + `browser_take_screenshot` + `browser_click` + form-submission tool chain, an attacker who can influence the agent's prompt stream — directly, or indirectly via attacker-controlled content the agent is asked to read (indirect prompt injection) — can cause the MCP server to read any file readable by its process and exfiltrate it to an attacker-controlled HTTP endpoint as a standard multipart upload.\n\nIn locally-run deployments this enables arbitrary file disclosure from the server process. In hosted deployments where a single MCP server process is shared across tenants, the same primitive has the potential to cross tenant isolation, depending on deployment topology. The PoCs were exercised against single-host deployments; the multi-tenant implication is derived from the tool-chain semantics, not independently demonstrated.\n\n### Details\n\nThe MCP server registers a `browser_file_upload` tool whose `paths` parameter accepts arbitrary absolute filesystem paths. Before commit `d47197f4`, `paths` was not constrained to any workspace root, and navigation to `file://` URLs was not blocked. No validation prevented the server from reading and transmitting files such as `/etc/passwd`, container mount points, cached credentials from the Playwright profile directory, and any other file readable by the MCP process.\n\nThe tool is invoked solely based on LLM-driven tool selection. There is no user confirmation step between the MCP client's tool call and the server's filesystem read + HTTP upload. Any payload that successfully influences the LLM is sufficient to trigger exfiltration.\n\nA second path is implied by the MCP protocol itself: any party that can establish an MCP transport connection to the server can invoke `browser_file_upload` directly through the standard MCP `tools/call` interface, bypassing the LLM entirely. The upstream fix (`allowUnrestrictedFileAccess` default-false) addresses both paths, because the path restriction is enforced at the tool invocation layer regardless of caller.\n\nThis behavior is reachable under default configuration in affected versions, without requiring any non-default flags, elevated privileges, or explicit user confirmation.\n\n### Fix\n\nThe upstream fix introduces an `allowUnrestrictedFileAccess` configuration option (default `false`), which restricts filesystem access to workspace root directories and blocks `file://` navigation.\n\nFix commit: microsoft/playwright-mcp@d47197f41fb79a6db8d8f593e7548918c0872b47\n\nFirst patched npm release: `@playwright/mcp@0.0.55`.\n\n### Impact\n\n**Locally-run deployments.** Arbitrary file disclosure from the process running `@playwright/mcp`. MCP agents are typically run by developers under accounts with broad filesystem access, so this routinely includes SSH keys, cloud credentials, browser session stores, `.env` files, and project source.\n\n**Hosted deployments with shared MCP processes.** In deployments where a single MCP server process handles requests from multiple tenants without strict OS-level isolation, the same primitive enables cross-tenant data access. This implication follows from the absence of path restrictions and process-level isolation, and was not independently tested against a production multi-tenant deployment.\n\n### References\n\nFull advisory with PoC and timeline: https://github.com/mmzha2013/security-research/security/advisories/GHSA-fhw2-h46x-v2mj",
9+
"severity": [
10+
{
11+
"type": "CVSS_V4",
12+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "npm",
19+
"name": "@playwright/mcp"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "0.0.55"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/mmzha2013/security-research/security/advisories/GHSA-fhw2-h46x-v2mj"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/microsoft/playwright-mcp/commit/d47197f41fb79a6db8d8f593e7548918c0872b47"
44+
},
45+
{
46+
"type": "PACKAGE",
47+
"url": "https://github.com/microsoft/playwright-mcp"
48+
},
49+
{
50+
"type": "WEB",
51+
"url": "https://www.npmjs.com/package/@playwright/mcp"
52+
}
53+
],
54+
"credits": [
55+
{
56+
"name": "mmzha2013",
57+
"type": "FINDER"
58+
}
59+
],
60+
"database_specific": {
61+
"cwe_ids": [
62+
"CWE-749"
63+
],
64+
"severity": "HIGH"
65+
}
66+
}

0 commit comments

Comments
 (0)