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, lines 78–90
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
json // In your MCP config (mcp.json) { "playwright": { "command": "npx", "args": ["playwright-mcp"] } }bash npm install -g playwright-mcp npx playwright installTechnical Analysis
The instructions configure
npxto executeplaywright-mcpwithout an exact version and recommend installing the package globally. Package resolution therefore depends on mutable npm registry state rather than a reviewed and reproducible dependency version.If the package is not already installed locally,
npxmay retrieve executable package content from the registry. A later release, compromised maintainer account, package takeover, or registry compromise could consequently alter the code executed by users after this skill has been reviewed. Global installation also expands the package's availability and potential impact beyond a single isolated project.This is a supply-chain weakness rather than evidence that the currently referenced package is malicious. The project contains no bundled malicious executable and does not itself perform the installation automatically.
Attack Path
- An attacker compromises the referenced npm package, its publisher account, or a future package release.
- Malicious code is published under the same unpinned package name.
- A user follows the troubleshooting guide or starts the configured MCP server.
npm install -g playwright-mcpornpx playwright-mcpresolves the mutable package version from the registry.- The downloaded package executes with the privileges and environment of the invoking user.
- Malicious package code could read accessible project files and environment variables, alter local files, or use the user's network access and configured crede ...[truncated 484 chars]
- Remediation
View remediation
Remediation Suggestions
- Verify and document the official package name, publisher, and source repository before recommending installation.
- Pin an audited exact version, for example
playwright-mcp@X.Y.Z, rather than resolving the latest release. - Prefer a project-local development dependency over
npm install -gso that execution is isolated to the relevant project. - Commit the applicable lockfile and use a reproducible installer such as
npm ci. - Configure the MCP server to execute the locally installed binary, or use
npx --no-install playwright-mcp, preventing implicit registry downloads at runtime. - Review package lifecycle scripts and published contents before approval; use
--ignore-scriptsduring installation where compatible. - Apply npm integrity and provenance verification and document the expected package checksum or signed release provenance.
- Run the MCP server with restricted filesystem, environment-variable, credential, and network access consistent with its browser-testing function.
