T08 · Insecure Dependencies
Error
- Location
- SKILL.md:22
- Finding
- Unpinned npm Package Is Downloaded and Executed Automatically## Vulnerability Details **File Location**: `SKILL.md:22-23` **Vulnerability Type**: Unpinned remote dependency execution **Risk Level**: High ### Vulnerable Code ```json "command": "npx", "args": ["-y", "@vbotholemu/mcp-aviation-weather"] ``` ### Technical Analysis The documented MCP configuration invokes `npx` with the `-y` option and a package name that has no exact version constraint. Consequently, npm can download and execute the registry version resolved at invocation time without requesting user confirmation. The effective executable is the package's published `dist/index.js`. That artifact is not included in the audited project, so its equivalence to the reviewed `src/index.ts` implementation cannot be established. The package identity is also inconsistent: `SKILL.md` and `package.json` reference `@vbotholemu/mcp-aviation-weather`, while `README.md` instructs users to execute `@blue-trianon/mcp-aviation-weather`. This ambiguity increases the possibility of installing an unintended or unverified package. This creates a supply-chain trust boundary in which code can change after the skill has been reviewed. A malicious package release, registry account compromise, package-name mistake, or ownership transfer could cause arbitrary attacker-controlled JavaScript to run when the MCP server starts. ### Attack Path 1. An attacker compromises the referenced npm package, its publisher account, or another package selected because of the documented identity mismatch. 2. The attacker publishes a malicious package version whose executable or installation lifecycle behavior contains an arbitrary payload. 3. A user applies the configuration from `SKILL.md`. 4. The MCP client executes `npx -y @vbotholemu/mcp-aviation-weather`. 5. `npx` resolves and downloads the current registry package without interactive approval. 6. npm or `npx` runs the package-controlled code with the privileges and environment of the MCP host process. ...[truncated 590 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the invoked package to an audited exact version, for example: ```json "command": "npx", "args": ["-y", "@vbotholemu/mcp-aviation-weather@1.0.0"] ``` 2. Reconcile the package name across `SKILL.md`, `README.md`, and `package.json` so all installation instructions identify the same verified publisher and package. 3. Include a lockfile and use deterministic installation procedures such as `npm ci` where the deployment model permits it. 4. Verify npm provenance, publisher identity, package integrity hashes, and signatures before deployment. 5. Ensure the reviewed build output is reproducible and confirm that the published `dist/index.js` matches the audited source. 6. Prefer installing and approving the dependency separately instead of allowing the MCP client to retrieve executable code automatically at startup. 7. Run the MCP server in a restricted account or sandbox with minimal filesystem, environment-variable, process-execution, and network permissions. 8. Disable or tightly control npm lifecycle scripts during trusted installation workflows where they are unnecessary.
