T08 · Insecure Dependencies
Error
- Location
- SKILL.md:16
- Finding
- Automatic Retrieval and Execution of an Unreviewed npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 16-25 **Vulnerability Type**: Supply-chain risk caused by automatic third-party package execution **Risk Level**: High ### Vulnerable Code ```markdown **Installation Requirement:** Before this skill will work, you or your agent must configure the Elen MCP server in your IDE/Agent settings (e.g., Cursor, Claude, Windsurf): ```json { "mcpServers": { "elen": { "command": "npx", "args": ["-y", "@learningnodes/elen-mcp@0.1.1"] } } } ``` ``` ### Technical Analysis The prescribed configuration invokes `npx` with the `-y` option. This allows npm to retrieve and execute `@learningnodes/elen-mcp@0.1.1` without interactive confirmation. Pinning the package to version `0.1.1` limits version drift, but the project does not include the package source, a dependency lockfile, integrity hashes, a trusted-source declaration, or other provenance controls. The package and its transitive dependencies therefore remain outside the reviewed project and cannot be verified from the available artifact. If the named package, its publisher account, the npm distribution channel, or a transitive dependency were compromised, initialization of the MCP server could execute attacker-controlled code with the permissions of the IDE or agent process. ### Attack Path 1. An attacker compromises the referenced npm package, its publisher account, or one of its transitive dependencies. 2. A user or agent follows the documented configuration. 3. The IDE launches `npx -y @learningnodes/elen-mcp@0.1.1`. 4. `npx` retrieves the package and dependencies from the configured npm registry without requesting confirmation. 5. Package installation hooks or runtime entry points execute attacker-controlled code. 6. That code operates with the local permissions and accessible environment of the IDE or agent process. ### Impact Assessment A compromised dependency co ...[truncated 519 chars]
- Remediation
- ## Remediation Suggestions 1. Vendor or otherwise include the MCP server implementation in a reviewable source repository. 2. Use an audited lockfile that pins all transitive dependencies. 3. Verify package provenance and publish the expected registry, source repository, maintainer identity, and package integrity hashes. 4. Avoid automatic `npx -y` retrieval during normal skill use. Require an explicit, separately reviewed installation step. 5. Disable or carefully review dependency installation scripts where operationally possible. 6. Run the MCP server in a sandbox with narrowly scoped filesystem access, a minimal environment, and restricted network access. 7. Do not expose unrelated credentials, tokens, or sensitive environment variables to the MCP process. 8. Establish a dependency update and vulnerability-monitoring process before changing the pinned package version.
