T08 · Insecure Dependencies
- Location
docs/TROUBLESHOOTING.md:78- Finding
Unpinned Third-Party MCP Package Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
docs/TROUBLESHOOTING.md:78-90
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
bash # In your MCP config (mcp.json) { "playwright": { "command": "npx", "args": ["playwright-mcp"] } }bash npm install -g playwright-mcp npx playwright installTechnical Analysis
The troubleshooting guide instructs users to install and execute
playwright-mcpwithout specifying an exact, reviewed version or verifying package integrity. The MCP configuration also invokes the package throughnpx, which can download and execute the version currently available from the configured npm registry when no suitable local installation exists.This creates a supply-chain risk because the effective executable may change after the Skill package has been audited. A compromised maintainer account, malicious package update, registry compromise, or dependency takeover could cause subsequently retrieved code to execute with the privileges of the user running Claude Code or OpenClaw.
The package is relevant to the Skill's browser-testing functionality, so using a Playwright integration is within the declared scope. However, executing an unpinned package from a mutable external registry exceeds the minimum safe dependency behavior because neither version constraints nor integrity controls are provided.
No evidence establishes that the current
playwright-mcppackage is malicious. The vulnerability is the unsafe and mutable dependency retrieval process.Attack Path
- An attacker compromises the npm package, its publisher account, the configured registry, or a transitive dependency.
- The attacker publishes a malicious version under the package name referenced by the documentation.
- A user follows the troubleshooting guide and runs
npm install -g playwright-mcp, or configures the MCP server to inv ...[truncated 1223 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the MCP package to an exact reviewed version, for example:
bash npm install --save-dev playwright-mcp@<reviewed-version> -
Commit and enforce a lockfile so the package and its transitive dependency graph resolve reproducibly.
-
Invoke only the locally installed dependency and prevent automatic registry retrieval:
bash npx --no-install playwright-mcpAlternatively, reference the executable under
node_modules/.bin/directly. -
Verify package provenance and integrity before installation. Use a trusted registry, review publisher ownership, inspect lifecycle scripts, and validate registry integrity metadata.
-
Avoid global installation. A project-local development dependency limits unintended cross-project use and makes the selected version auditable.
-
Run the MCP server in a restricted environment with only the project files, network destinations, browser profiles, and credentials required for testing.
-
Document an upgrade process requiring explicit review and testing before changing the pinned version.
-
Clarify that users should not expose production browser sessions, unrestricted credentials, or sensitive environment variables to the MCP process.
-
