MCP Puppeteer Server Audit: A Safety Gate the Model Can Open
We ran the deprecated @modelcontextprotocol/server-puppeteer locally and checked a public security report against its code: SSRF holds, and the dangerous-args gate is opened by tool arguments.
Approximately 6 min read
The npm package @modelcontextprotocol/server-puppeteer is the reference “let the model drive a browser” MCP server. Its registry metadata now carries a deprecation message calling it archived and unmaintained with no security guarantees, and the package’s metadata was last modified on 2026-11-05, the day this article was written. A public security report on the project’s issue tracker, issue #3662, describes SSRF, prompt-injection-to-JavaScript, and a sandbox bypass. According to that thread, the maintainer’s answer is that the server is archived and the problems will not be fixed upstream.
A report that will never be fixed is exactly where a claim audit is useful. People will keep running the package, so the question is what is actually true in the code. We downloaded the last published version, read it, and drove the real server over stdio. This article separates what we confirmed by running it, what we confirmed only by reading, and what we did not test.
What we examined
- Package:
@modelcontextprotocol/server-puppeteerversion 2025.5.12, the latest version in the registry. Its single entry file,dist/index.js, is 429 lines. - Dependencies installed: Puppeteer 23.11.1 and MCP SDK 1.0.1, with browser download skipped.
- Method: start
dist/index.jsas a child process, send MCPinitializeandtools/callrequests as JSON-RPC over stdio, and read the replies. - Environment: a Linux container running as root, where Chromium launch itself fails. That limits what we can claim about page loads (see below).
We do not know when the deprecation message was added to the registry. The modified timestamp is consistent with it being recent, but a timestamp is not proof.
The report’s claims, checked
| Claim in issue #3662 | What we found | How we know |
|---|---|---|
puppeteer_navigate accepts any URL, including file://, localhost and private ranges (SSRF) |
The handler passes args.url straight to page.goto. No scheme, host or range check exists in the file. |
Read the code; not run end to end |
Hostile page content can steer the model into puppeteer_evaluate, which runs JavaScript |
puppeteer_evaluate passes args.script to page.evaluate. Whether a given model is steered by a given page was not tested. |
Read the code; injection success untested |
A --allow-dangerous flag disables the sandbox |
No flag with that name exists in the code or the README. The real controls are an allowDangerous tool argument and an ALLOW_DANGEROUS environment variable. |
Searched the package |
| Docker deployments effectively need the dangerous option | When DOCKER_CONTAINER is set, the server merges hard-coded --no-sandbox, --single-process and --no-zygote defaults at launch. The dangerous-args check only inspects user-supplied options, so it never sees those defaults. |
Read the code; Docker image not run |
The first two rows are the mechanisms the report described, and the code supports them. The third row is a naming error that matters for mitigation: if you search your deployment for a CLI flag, you will find nothing and may conclude you are safe. The fourth row is a nuance the report did not state. The “dangerous arguments” guard exists, but the Docker default path sits outside it.
What the report missed: the gate is controlled by the caller
The puppeteer_navigate input schema, as returned by tools/list, has three properties: url, launchOptions and allowDangerous. The guard that rejects dangerous browser arguments reads allowDangerous from the same arguments object the model supplies on each call. We ran three calls against the real server.
A. Dangerous argument, no override. launchOptions.args = ["--disable-web-security"]. The server rejected the call with its “Dangerous browser arguments detected” error. The guard works against a naive request.
B. Same call plus allowDangerous: true. The guard passed the call through to the browser launch, which then failed in our container for environmental reasons. In other words, the model can lift the restriction in the same request that needs it. A prompt-injected model can do this without any human changing configuration.
C. launchOptions.executablePath set to a script of our own, with no allowDangerous. The guard did not object. Puppeteer started our script as if it were the browser, and the script’s marker file shows it ran with the usual Puppeteer launch arguments appended. executablePath is not in the guard’s list, so tool-call arguments can choose which program the server launches.
We used a harmless local script that only appended a line to a log file. Call C depends on how the MCP host handles tool arguments: if a host strips or blocks unexpected fields, or shows them to a human for approval, the exposure changes. We did not test any specific host.
This is the main finding. The report concentrates on what the model can reach with the browser. The code shows a prior step: the model can also reconfigure the browser, and the one safety check is parameterised by the party it is meant to restrain.
What this does and does not mean
It does not mean every use of this server is exploitable. An attacker needs a path to the model’s context, such as a web page the model is told to open or a document it reads, and the model must act on injected instructions. That chain was not measured here, and models differ.
It does mean the package should not be treated as a boundary. The only protections are an argument filter that tool arguments can switch off, plus the browser’s own sandbox, which the Docker path disables by default. Treat the server as running with whatever network and file access its process has.
Practical mitigations
These follow from the code. We did not test each one against a live browser.
- Replace the package. The registry marks it archived with no security guarantees, and in the issue thread the maintainer pointed to a community fork or maintained alternative instead of a fix.
- If you must keep it, filter at the MCP client or proxy. Remove
launchOptionsandallowDangerousfrom everypuppeteer_navigatecall before it reaches the server. Do not setALLOW_DANGEROUSin the environment. - Allowlist URLs outside the model. Block
file://, loopback, RFC 1918 ranges and the cloud metadata address at a proxy or firewall, not in the prompt. - Isolate the process. Run it as a non-root user in a container with no route to internal services, and only enable
puppeteer_evaluateif the task needs it. - Require approval on tool arguments. If your host shows tool-call arguments to a human, look for unexpected
launchOptions.
Limits of this audit
- Not run end to end: SSRF requests, page-content injection and the Docker image. Chromium launch fails in our root container, so no page was loaded.
- One version: 2025.5.12 only. We did not compare earlier releases or community forks.
- Reporter’s other statements (an OWASP category mapping, an arXiv figure about MCP servers, and a monthly download count) were not verified and we do not rely on them.
- No model testing: we did not measure how often any model follows injected instructions.
Reproduce it
npm pack @modelcontextprotocol/server-puppeteer
tar xzf modelcontextprotocol-server-puppeteer-*.tgz
cd package && PUPPETEER_SKIP_DOWNLOAD=1 npm install --omit=dev
# Send initialize, tools/list, then tools/call for puppeteer_navigate over stdio
# with the three argument sets from calls A, B and C above.
Compare your result with the three outcomes above. If your MCP host changes the picture, for example by stripping arguments, that is worth recording too.