T08 · Insecure Dependencies
- Location
skill.yaml:17- Finding
Automatic Execution of an Unpinned Remote npm Package
- Content
View full analysis
Vulnerability Details
File Location:
skill.yaml, lines 17–21
Vulnerability Type: Unpinned third-party dependency executed throughnpx
Risk Level: HighVulnerable Code:
yaml mcp: servers: - name: edge command: npx args: ["-y", "@edgedottrade/edge", "--api-key", "${API_KEY}"] repository: "https://github.com/edgetrade/edge"Technical Analysis
The Skill launches
@edgedottrade/edgeusingnpx -ywithout specifying an exact package version or verifying an integrity hash. As a result, npm can retrieve and execute whichever package version currently satisfies the implicit latest-version resolution.The
repositorymetadata does not cryptographically bind the downloaded npm package to the referenced GitHub repository. It therefore does not ensure that the executed artifact matches reviewed source code. The-yoption also suppresses the normal installation confirmation, allowing the package to be downloaded and run automatically.This creates a supply-chain trust boundary in which the effective executable can change after the Skill has been audited. A compromised npm publisher account, malicious package release, or registry compromise could introduce arbitrary code into subsequent executions.
Attack Path
- An attacker compromises the npm publisher account, package, or relevant registry distribution path for
@edgedottrade/edge. - The attacker publishes a malicious version that becomes the version resolved by the unpinned
npxinvocation. - The Skill starts the MCP server using
npx -y @edgedottrade/edge. npxdownloads and executes the malicious package without interactive confirmation.- The package runs with the MCP process's local privileges, receives the Edge API key as an argument, and has outbound network access.
- The malicious process can steal credentials, access locally available resources, communicate with attacker-controlled infr ...[truncated 725 chars]
- An attacker compromises the npm publisher account, package, or relevant registry distribution path for
- Remediation
View remediation
Remediation Suggestions
- Pin
@edgedottrade/edgeto a specific, security-reviewed version rather than relying on implicit latest-version resolution. - Verify the package with a lockfile and npm integrity metadata or a separately validated cryptographic digest.
- Install the reviewed dependency during a controlled build or deployment stage instead of downloading it dynamically at runtime.
- Remove
-ywhere interactive approval is feasible, although confirmation alone is not a substitute for version and integrity pinning. - Verify that the npm package provenance corresponds to the stated source repository and reviewed commit.
- Run the MCP server in a restricted sandbox with minimal filesystem, environment, process, and network access.
- Restrict outbound traffic to explicitly required Edge service endpoints.
- Apply an API key with the minimum required permissions and financial limits.
- Establish dependency monitoring and a controlled process for reviewing and upgrading the pinned version.
- Pin
