T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned npm Packages Permit Mutable Third-Party Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18–25
Vulnerability Type: Unpinned third-party dependencies and automatic remote package execution
Risk Level: MediumVulnerable Code
bash npm install -g @wavespeed/cli wavespeed login # opens https://wavespeed.ai/accesskey and stores the key wavespeed status # confirms you are signed intext Prefer MCP tools over shell commands? The same platform is exposed by [`@wavespeed/mcp`](https://github.com/WaveSpeedAI/mcp-server) (`npx -y @wavespeed/mcp`; tools `search_models`, `get_model_schema`, `get_price`, `upload_file`, `run_model`, `get_prediction`).Technical Analysis
The Skill instructs users or agents to install
@wavespeed/cliglobally and execute@wavespeed/mcpthroughnpx -ywithout pinning either package to a reviewed version or verifying package integrity.npm therefore resolves a mutable package version from the registry at execution time. The
npx -yoption suppresses installation confirmation and immediately executes downloaded package code. The global installation also makes the CLI broadly available in the user's environment. The project contains no lockfile, integrity hashes, or vendored implementation through which the executed dependency could be independently verified.There is no evidence that the named packages are currently malicious. The vulnerability is the unsafe dependency acquisition mechanism: a compromised package release, maintainer account, or distribution channel could cause future invocations of these documented commands to execute attacker-controlled code.
Attack Path
- An attacker compromises the npm publisher account, package repository, release pipeline, or another part of the distribution channel for
@wavespeed/clior@wavespeed/mcp. - The attacker publishes a malicious version that is selected by npm's default version resolution.
- A user or agent follows ...[truncated 1280 chars]
- An attacker compromises the npm publisher account, package repository, release pipeline, or another part of the distribution channel for
- Remediation
View remediation
Remediation Suggestions
- Pin both packages to explicit, reviewed versions, for example:
bash npm install --save-exact @wavespeed/cli@<reviewed-version> npx @wavespeed/mcp@<reviewed-version> - Use a project-local installation rather than a global installation so dependency scope and replacement are easier to control.
- Commit a lockfile generated from the reviewed dependency graph and use
npm cifor reproducible installation. - Verify registry provenance and package integrity before execution. Where supported, enforce npm provenance attestations and approved integrity hashes.
- Remove
-yfrom thenpxcommand so users receive an explicit installation prompt, and require informed confirmation before downloading or executing external packages. - Run the CLI or MCP server in a restricted environment with minimal filesystem access, no unrelated secrets, and only the network permissions necessary to reach the declared service.
- Keep
WAVESPEED_API_KEYscoped to the minimum required permissions and rotate it if dependency compromise is suspected. - Periodically audit pinned package releases and their transitive dependencies before upgrading.
- Pin both packages to explicit, reviewed versions, for example:
