T08 · Insecure Dependencies
Error
- Location
- skill.json:4
- Finding
- Automatic Execution of an Unpinned npm Package<![CDATA[ ## Vulnerability Details **File Location**: `skill.json`, lines 4–7 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code ```json "command": "npx", "args": [ "-y", "chrome-devtools-mcp@latest", ``` ### Technical Analysis The skill invokes `npx` with the `-y` option and identifies the dependency through the mutable `latest` distribution tag. This causes npm to obtain and execute the currently published version of `chrome-devtools-mcp` without an interactive confirmation step. Because `latest` does not identify an immutable, previously reviewed release, the effective code executed by the skill can change after this package has been audited. A compromised package publication, compromised maintainer account, or unsafe future release could consequently introduce arbitrary code into the skill's execution path. ### Attack Path 1. An attacker compromises the upstream package, its publishing credentials, or the release process. 2. The attacker publishes a modified version and assigns it to the `latest` npm tag. 3. A user or agent invokes this skill. 4. `npx -y` resolves and downloads the attacker-controlled release without requesting confirmation. 5. The downloaded package executes with the permissions and accessible resources of the account running the skill. ### Impact Assessment A malicious upstream release could execute arbitrary code with the privileges of the agent process. Depending on the runtime environment, it could access readable files, environment variables, browser-profile data, network resources, and other credentials available to that account. No evidence shows that the currently referenced package performs these malicious actions; the vulnerability is the mutable and automatically executed dependency path. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace `chrome-devtools-mcp@latest` with an exact, reviewed version such as `chrome-devtools-mcp@x.y.z`. - Review each dependency update before changing the pinned version. - Use a lockfile and npm integrity metadata where the deployment model permits them. - Prefer installing dependencies during a controlled build stage rather than downloading executable code when the skill is invoked. - Remove automatic confirmation through `-y` where interactive approval is operationally possible. - Run the MCP server under a dedicated, non-privileged account or isolated container with only the filesystem and network access required for browser debugging. ]]>
