Back to skill

Security audit

Playwright Mcp 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is not malicious, but it should be reviewed carefully because it runs unpinned npm/npx packages for a powerful MCP server that can control web sessions.

Install only in an isolated, unprivileged environment, pin and verify exact package versions before use, avoid global installation when possible, set allowed hosts for browsing, and use ignore-HTTPS-errors only for a clearly justified test target.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:4
Finding
Unpinned npm and npx Packages Execute Mutable Third-Party Code## Vulnerability Details **File Location**: `SKILL.md:4, 13-15, 20, 27` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw":{"emoji":"🎭","os":["linux","darwin","win32"],"requires":{"bins":["playwright-mcp","npx"]},"install":[{"id":"npm-playwright-mcp","kind":"npm","package":"@playwright/mcp","bins":["playwright-mcp"],"label":"Install Playwright MCP"}]}} ``` ```bash npm install -g @playwright/mcp # Or npx @playwright/mcp ``` ```bash npx playwright install chromium ``` ```bash npx @playwright/mcp ``` ### Technical Analysis The installation and execution instructions do not pin exact versions of `@playwright/mcp` or `playwright`. As a result, npm resolves package contents from the configured registry at execution time. The project provides no lockfile, integrity checksum, or other mechanism that binds installation to a previously reviewed artifact. Both `npm install` and `npx` may download and execute third-party package code, including npm lifecycle scripts. Therefore, the code ultimately executed can change after this skill has been audited. Global installation through `npm install -g` also places package executables in a system-wide tool location available to the current user. This finding represents a supply-chain weakness rather than evidence that the named packages are currently malicious. ### Attack Path 1. An attacker compromises the relevant npm package, publisher account, registry distribution path, or a future package release. 2. The attacker publishes code containing a malicious lifecycle script or executable payload. 3. A user follows the skill documentation and runs an unversioned `npm install` or `npx` command. 4. npm resolves and downloads the attacker-controlled release because no reviewed version or integrity value is specified. 5. The malicious package code executes with the privileges of the user running the command. 6. For global installation, an attac ...[truncated 851 chars]
Remediation
## Remediation Suggestions 1. Pin every npm package to an exact reviewed version, including metadata installation declarations and command examples: ```bash npm install --global @playwright/mcp@EXACT_REVIEWED_VERSION npx --no-install @playwright/mcp@EXACT_REVIEWED_VERSION npx --package=playwright@EXACT_REVIEWED_VERSION --no-install playwright install chromium ``` 2. Prefer a project-local installation over a global installation to limit system-wide exposure: ```bash npm install --save-exact @playwright/mcp@EXACT_REVIEWED_VERSION ``` 3. Commit a lockfile generated by a supported npm version and use `npm ci` for reproducible installation. 4. Preserve and verify npm integrity metadata. Where the deployment workflow permits it, independently verify package checksums, provenance attestations, publisher identity, and registry configuration before installation. 5. Prevent `npx` from silently downloading missing packages. Preinstall the reviewed dependency and use `--no-install` or the equivalent supported npm option. 6. Run browser automation and package installation as an unprivileged user in an isolated environment with restricted filesystem and network access. 7. Establish a dependency update process that reviews release notes, package ownership, lifecycle scripts, transitive dependency changes, and artifact integrity before changing the pinned version.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill advertises and instructs shell execution paths (`npm install`, `npx`, CLI flags) but does not declare an explicit tool scope such as `permissions` or `allowed-tools`. In an agent setting, missing scope boundaries increases the chance that the skill can trigger broader shell access than reviewers or runtime policy expect, which is especially relevant because this skill launches an MCP server that can drive a browser and execute page JavaScript.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
Using `npx @playwright/mcp` without a pinned version causes execution of whatever package version is current at install/run time. This creates a supply-chain risk where a malicious or compromised upstream release could be fetched and executed automatically in the agent environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
Running `npx playwright install chromium` without pinning the Playwright package version makes browser/tooling resolution depend on the latest published package state. While this is a common setup instruction, it still weakens reproducibility and exposes users to upstream tampering or unexpected changes during installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
This startup command launches an unpinned MCP server package directly from the registry. Because the skill is specifically for browser automation and exposes powerful actions like navigation, form filling, file upload, and JavaScript evaluation, compromise of the fetched package could lead to significant agent and data exposure.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The headless-mode example still invokes `npx @playwright/mcp` without version pinning, preserving the same supply-chain execution risk. The headless context may make abuse less visible operationally, which can worsen detection if a malicious package is executed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The Firefox example uses the same unpinned `npx` pattern, meaning runtime behavior depends on whatever version is currently served by the package registry. Since this skill can automate authenticated sessions and interact with arbitrary web content, compromise of the package could have broad downstream impact.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The viewport example repeats direct execution of an unpinned remote package. Repetition across documentation increases the likelihood that users copy insecure commands into automation workflows, normalizing non-reproducible and potentially unsafe package execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The `--ignore-https-errors` example combines two risky properties: an unpinned package fetch and disabling HTTPS certificate validation in browser sessions. In this skill context, that makes the command more dangerous because it can both execute untrusted package code and facilitate browser interaction with MITM-susceptible endpoints.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The troubleshooting instruction `npx playwright install chromium` is also unpinned and therefore subject to the same reproducibility and supply-chain concerns as the earlier install step. Although lower risk than launching the MCP server itself, it still pulls executable tooling based on mutable upstream state.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The debug-mode command again executes an unpinned MCP package, and debugging/output modes may expose more runtime information if a compromised package runs. Because this skill is designed to automate browsers and potentially handle sensitive page content, executing mutable remote package code is a meaningful security weakness.

Static analysis

No suspicious patterns detected.