T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Third-Party Packages Are Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 18–25 **Vulnerability Type**: Unpinned npm dependencies and automatic execution of remotely retrieved packages **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @wavespeed/cli ``` ```bash npx -y @wavespeed/mcp ``` ### Technical Analysis The documented setup commands install or execute third-party npm packages without pinning them to reviewed versions, using a lockfile, or verifying package integrity. `npm install -g @wavespeed/cli` resolves the current package release and installs it globally. npm installation can execute package lifecycle scripts under the privileges of the invoking user. A global installation also makes the package broadly available in the user's environment. `npx -y @wavespeed/mcp` is more direct: it resolves a package dynamically, suppresses the installation confirmation with `-y`, downloads it when necessary, and executes its entry point. Consequently, the code that runs can differ from the code that was available when this Skill was audited. This is a supply-chain weakness rather than evidence that the named packages are currently malicious. Exploitation would require compromise of the package, its publisher account, its dependency chain, or the package-resolution infrastructure. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or dependency chain associated with one of the referenced packages. 2. The attacker publishes a malicious release that becomes the version selected by npm's default resolution behavior. 3. A user follows the Skill instructions and runs either the unpinned global installation or the automatic `npx -y` command. 4. npm downloads the attacker-controlled release. 5. Malicious lifecycle scripts or package entry-point code execute with the privileges of the user running the command. 6. The payload can access resources available to that user, p ...[truncated 653 chars]
- Remediation
- ## Remediation Suggestions 1. Pin each dependency to a specifically reviewed version, for example: ```bash npm install -g @wavespeed/cli@<reviewed-version> npx --yes @wavespeed/mcp@<reviewed-version> ``` 2. Prefer a project-local installation governed by a committed lockfile instead of a global installation: ```bash npm install --save-exact @wavespeed/cli@<reviewed-version> npm ci ``` 3. Commit and review `package-lock.json`, and use `npm ci` in automated environments to enforce deterministic dependency resolution. 4. Verify package provenance, publisher identity, signatures or attestations where available, and registry integrity metadata before installation. 5. Avoid `npx -y` for security-sensitive workflows. Install an approved version first, review the resolved dependency tree, and then execute the local binary. 6. Run third-party tooling as a non-administrative user in a restricted environment with access only to the files required for the task. 7. Keep authentication material outside the package working directory and limit the permissions and lifetime of API credentials.
