T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Global Installation of a Third-Party CLI Package## Vulnerability Details **File Location**: `SKILL.md`, line 18 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @wavespeed/cli wavespeed login # opens https://wavespeed.ai/accesskey and stores the key wavespeed status # confirms you are signed in ``` ### Technical Analysis The Skill instructs users to globally install `@wavespeed/cli` without specifying an exact reviewed version or verifying package integrity. Consequently, npm resolves whichever release is current at installation time. The installed code can therefore differ from the version assessed when the Skill was published. npm packages can run lifecycle scripts during installation. Such scripts execute with the permissions of the invoking user and may access the filesystem, environment variables, network, and user configuration. A compromised package release, transitive dependency, maintainer account, or package-registry response could therefore introduce arbitrary local code execution. Global installation increases the exposure because the package is placed into a shared executable location and may subsequently be invoked from unrelated working directories. The accompanying authentication workflow also creates a locally stored WaveSpeed credential that compromised package code could attempt to access. ### Attack Path 1. An attacker compromises the `@wavespeed/cli` package, one of its transitive dependencies, its publisher account, or the relevant package-distribution channel. 2. The attacker publishes a malicious release or modifies an installation dependency. 3. A user follows the Skill and runs `npm install -g @wavespeed/cli`. 4. npm resolves the unpinned malicious release and executes any applicable installation lifecycle scripts. 5. The malicious code executes with the invoking user's privileges and may inspect local files, environment variables, npm c ...[truncated 776 chars]
- Remediation
- ## Remediation Suggestions - Pin `@wavespeed/cli` to an exact version that has undergone security review. - Prefer a project-local installation governed by a committed lockfile instead of a global installation. - Use deterministic installation mechanisms such as `npm ci` with a reviewed lockfile. - Verify package provenance, publisher identity, registry source, and integrity metadata before installation. - Review the package and its transitive dependencies for unexpected lifecycle scripts. - Where operationally feasible, disable installation scripts and explicitly enable only those proven necessary. - Run the CLI as a non-privileged user in a restricted environment with access only to files required for the requested image task. - Document how and where credentials are stored, apply restrictive filesystem permissions, and support credential revocation and rotation after suspected package compromise.
