T08 · Insecure Dependencies
Error
- Location
- README.md:39
- Finding
- Unpinned Runtime Dependency Allows Unreviewed Code Execution## Vulnerability Details **File Location**: `README.md`, lines 39-47 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High **Vulnerable Configuration**: ```json { "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } } } ``` ### Technical Analysis The documented MCP configuration launches `@playwright/mcp@latest` through `npx`. The `latest` distribution tag is mutable and does not identify an immutable, previously reviewed package version. Depending on the local npm cache and `npx` behavior, starting the MCP service may download and execute package code that was not present during this audit. The effective executable can consequently change without any modification to this project. The configuration also provides no lockfile, integrity hash, package provenance verification, or installation review step. This creates a supply-chain trust boundary in which control of the upstream package, its publishing credentials, the npm account, or the mutable distribution tag can determine which code runs locally. ### Attack Path 1. An attacker compromises the upstream package, maintainer account, publishing token, or package distribution process. 2. The attacker publishes a malicious package version and assigns it to the `latest` tag. 3. A user follows the documented configuration and starts the Playwright MCP service. 4. `npx` resolves `@playwright/mcp@latest` to the attacker-controlled release. 5. The downloaded package executes with the privileges and environment of the MCP process. 6. The malicious package can access resources available to that process, potentially including environment variables, browser sessions, accessible local files, and network connectivity. ### Impact Assessment Successful exploitation permits arbitrary code execution under the operating-system account that launches the MCP service. The precise scop ...[truncated 432 chars]
- Remediation
- ## Remediation Suggestions - Replace `@playwright/mcp@latest` with an exact, reviewed version. - Install dependencies in a controlled setup phase rather than downloading them implicitly when the MCP server starts. - Commit and enforce a package lockfile where applicable. - Verify package integrity and provenance before installation. - Use an internal registry or approved dependency mirror for production deployments. - Run the MCP process in a restricted environment with minimal filesystem access, limited environment variables, and constrained network access. - Establish a deliberate dependency-update process that reviews release changes before changing the pinned version.
