T08 · Insecure Dependencies
- Location
SKILL.md:174- Finding
Mutable Third-Party Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 174-181
Vulnerability Type: Unsafe, unpinned dependency execution
Risk Level: Highjson "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
npxwith both-yand 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.jsonalso 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
- An attacker compromises the
@playwright/mcppackage, its maintainer account, or the package distribution channel. - The attacker publishes a malicious version and causes it to become the package's
latestrelease. - The user follows the Skill instructions and adds the command to
~/.cursor/mcp.json. - Cursor reloads the MCP configuration and invokes
npx -y @playwright/mcp@latest. npxdownloads and executes the attacker-controlled package without an interactive installation confirmation.- 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]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version. - Use package-locking and integrity verification where supported so that the resolved artifact cannot change silently.
- Verify and document the authoritative package name, publisher, and registry source.
- Avoid
npx -yfor initial installation. Require the user to review and explicitly approve the package and version. - Do not modify
~/.cursor/mcp.jsonautomatically. Display the proposed configuration and request explicit consent before writing it. - Restrict the MCP process using operating-system sandboxing and the minimum filesystem and network permissions needed for browser control.
- Establish a controlled upgrade process in which new versions are reviewed before the pinned version is changed.
- Replace
