T08 · Insecure Dependencies
Error
- Location
- SKILL.md:174
- Finding
- Mutable Third-Party Package Is Automatically Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 174-181 **Vulnerability Type**: Unsafe, unpinned dependency execution **Risk Level**: High ```json "playwright-cdp": { "command": "npx", "args": ["-y", "@playwright/mcp@latest", "--cdp-endpoint", "http://127.0.0.1:9222"] } ``` ### Technical Analysis The proposed persistent MCP configuration invokes `npx` with both `-y` and the mutable version selector `@latest`. This causes the package manager to accept installation automatically and execute whichever release is currently identified as the latest version. Because the effective executable can change after the Skill has been reviewed, the configuration does not provide a reproducible or auditable dependency boundary. A compromised package maintainer account, malicious future release, or package-registry compromise could replace the expected implementation with arbitrary code. Writing this command into `~/.cursor/mcp.json` also makes the unsafe execution behavior persistent across future MCP reloads. Persistent MCP configuration modification exceeds the minimum privileges needed to carry out an individual browser-automation request and should not occur without explicit user approval. ### Attack Path 1. An attacker compromises the `@playwright/mcp` package, its maintainer account, or the package distribution channel. 2. The attacker publishes a malicious version and causes it to become the package's `latest` release. 3. The user follows the Skill instructions and adds the command to `~/.cursor/mcp.json`. 4. Cursor reloads the MCP configuration and invokes `npx -y @playwright/mcp@latest`. 5. `npx` downloads and executes the attacker-controlled package without an interactive installation confirmation. 6. The malicious package executes with the operating-system privileges of the Cursor user. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the current user's ac ...[truncated 434 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version. 2. Use package-locking and integrity verification where supported so that the resolved artifact cannot change silently. 3. Verify and document the authoritative package name, publisher, and registry source. 4. Avoid `npx -y` for initial installation. Require the user to review and explicitly approve the package and version. 5. Do not modify `~/.cursor/mcp.json` automatically. Display the proposed configuration and request explicit consent before writing it. 6. Restrict the MCP process using operating-system sandboxing and the minimum filesystem and network permissions needed for browser control. 7. Establish a controlled upgrade process in which new versions are reviewed before the pinned version is changed.
