T08 · Insecure Dependencies
- Location
skill.md:20- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, lines 20–24
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code
markdown The CLI is installed via: `npm install -g @saucedocs/motie-cli` ```bash npm install -g @saucedocs/motie-clitext ### Technical Analysis The Skill directs users to install the latest available release of `@saucedocs/motie-cli` globally. No exact version, lockfile, package integrity value, provenance check, or reviewed source revision is specified. npm installation may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Consequently, compromise of the package, its publisher account, or a transitive dependency could cause attacker-controlled code to execute with the privileges of the user performing the installation. Global installation also expands the affected scope by placing package files or executable shims in the user's global npm environment. The audit found no evidence that the named package is currently malicious. The vulnerability is the unsafe, mutable dependency-installation procedure. ### Attack Path 1. An attacker compromises the package publisher, package release process, or a transitive dependency. 2. The attacker publishes a malicious release under the existing package name. 3. A user follows the Skill's unpinned `npm install -g` instruction. 4. npm retrieves the current release rather than a previously reviewed version. 5. Malicious lifecycle scripts or package code execute under the installing user's account. 6. The attacker can access data and modify resources available to that account. If the user independently runs the command with elevated privileges, the impact could extend further, although elevation is not instructed by this Skill. ### Impact Assessment Successful exploitation could result in arbitrary code execution with the installing user's privi ...[truncated 347 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, for example
@saucedocs/motie-cli@X.Y.Z. - Publish and verify the expected package integrity hash and package provenance.
- Prefer a project-local installation governed by a committed lockfile over a global installation.
- Review direct and transitive dependencies before updating the pinned version.
- Where compatible with the package, disable lifecycle scripts during installation and explicitly review any scripts that must run.
- Do not instruct users to run the installation with
sudoor another elevated account. - Document the expected package publisher, registry, version, and verification procedure.
- Pin the dependency to an exact, reviewed version, for example
