T08 · Insecure Dependencies
Error
- Location
- SKILL.md:19
- Finding
- Unpinned npm Package Is Downloaded and Executed Without Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:19-22` **Vulnerability Type**: Unpinned dependency execution and supply-chain exposure **Risk Level**: High ### Vulnerable Code ```json { "mcpServers": { "sanctions-check": { "command": "npx", "args": ["-y", "@vbotholemu/mcp-sanctions-check"] } } } ``` The project also declares dependencies using non-exact version ranges and does not include a lockfile: ```json "dependencies": { "@modelcontextprotocol/sdk": "^1.12.1", "csv-parse": "^5.6.0", "zod": "^3.23.0" }, "devDependencies": { "typescript": "^5.7.0", "@types/node": "^22.0.0" } ``` ### Technical Analysis The documented configuration invokes `npx` with `-y` and no package version. This causes npm to retrieve and execute the registry's currently resolved release without confirmation. Consequently, the code executed on a user's system is not necessarily the source reviewed in this audit. The absence of a package lockfile and the use of caret dependency ranges also allow dependency resolution to change over time. Although semantic-version constraints limit the accepted versions, they do not guarantee that future compatible releases contain the same audited code. There is also an identity inconsistency: `README.md` refers to `@velocibot/mcp-sanctions-check`, while `SKILL.md` and `package.json` identify `@vbotholemu/mcp-sanctions-check`. This inconsistency increases package-confusion and operator-error risks. ### Attack Path 1. An attacker compromises the package publisher account, npm package, or a transitive dependency. 2. The attacker publishes a malicious version that satisfies the unpinned package request or declared dependency ranges. 3. A user follows the documented configuration and starts the MCP server. 4. `npx -y` downloads the newly resolved package without asking for confirmation. 5. npm or the MCP host executes the malicious package with the privileges of the invoking user. ### Impact Assessmen ...[truncated 469 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the package to an exact reviewed version, for example: ```json "args": ["-y", "@vbotholemu/mcp-sanctions-check@1.0.0"] ``` - Prefer installing from a lockfile with registry integrity hashes and running the verified local installation instead of downloading code at every launch. - Remove `-y` where interactive confirmation is appropriate. - Commit a package lockfile and use deterministic installation commands such as `npm ci`. - Consider pinning direct dependencies to exact versions and use automated dependency review before updates. - Correct `README.md`, `SKILL.md`, and `package.json` so that they consistently identify one verified npm package and publisher. - Verify package signatures, provenance attestations, and registry ownership as part of release and deployment procedures. ]]>
