T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Global Installation of a Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:14-15` **Vulnerability Type**: Supply-chain risk caused by an unpinned globally installed dependency **Risk Level**: Medium ### Complete Code Snippet ```bash npm install -g mmx-cli mmx auth login --api-key <your-api-key> ``` ### Technical Analysis The installation command retrieves and executes the latest available version of `mmx-cli` from the npm registry. It does not specify a reviewed version, verify package integrity, require npm provenance, or use a lockfile. npm installations can execute package lifecycle scripts. Because the package is installed globally, such scripts and the resulting executable run with the permissions of the user performing the installation. The GitHub URL mentioned elsewhere in the documentation does not cryptographically establish that the downloaded npm artifact corresponds to reviewed source code from that repository. This does not prove that the current `mmx-cli` package is malicious. However, the documented installation process creates an exploitable supply-chain boundary: compromise of the npm publisher, package release process, registry account, or a future release could introduce code that executes when users follow these instructions. ### Attack Path 1. An attacker compromises the npm publisher account, release pipeline, or another component used to publish `mmx-cli`. 2. The attacker publishes a modified version under the expected package name. 3. A user or agent follows the Skill and runs `npm install -g mmx-cli` without a version constraint. 4. npm downloads the attacker-controlled release and may execute its installation lifecycle scripts. 5. The installed CLI subsequently executes with the user's privileges and can access credentials, local files supplied to the CLI, prompts, generated outputs, and network resources available to that user. ### Impact Assessment Successful exploitation would permit arbitrary code execution with the privileges of t ...[truncated 547 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin installation to an explicitly reviewed version, for example: ```bash npm install -g mmx-cli@<reviewed-version> ``` 2. Publish and verify the expected package version, integrity digest, npm publisher identity, and provenance. 3. Prefer a project-local installation with a committed lockfile over a global installation. 4. Install and execute the CLI in a least-privilege environment or isolated container when possible. 5. Disable npm lifecycle scripts during installation if the package does not require them: ```bash npm install --ignore-scripts mmx-cli@<reviewed-version> ``` 6. Verify that the npm package contents correspond to a signed and reviewed source release. 7. Document the trusted npm package scope, publisher, version, and checksum rather than relying only on a separate GitHub URL. ]]>
