T08 · Insecure Dependencies
Error
- Location
- SKILL.md:25
- Finding
- Unpinned npm packages are downloaded and executed during setup<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:25-29, 46-69` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: High ### Vulnerable Code ```yaml install: - id: 'npm' kind: 'node' package: '@getdex/cli' bins: ['dex'] label: 'Install Dex CLI (npm)' ``` ```bash npx -y add-mcp https://mcp.getdex.com/mcp -y ``` ```bash npm install -g @getdex/cli ``` ```bash npm install -g @getdex/cli@latest ``` ### Technical Analysis The setup instructions download and execute mutable npm packages without pinning them to an exact reviewed version or verifying package integrity. In particular, `npx -y add-mcp` automatically accepts installation and immediately runs the package. The global CLI installation likewise resolves whatever release is current at execution time, while `@latest` explicitly follows a mutable distribution tag. The package names are consistent with the declared Dex functionality, and the audited files contain no evidence that the current upstream packages are malicious. Nevertheless, the reviewed Skill does not determine the code that will ultimately execute. A compromised npm publisher account, registry response, dependency release, or future malicious package version could introduce arbitrary code after the Skill itself has passed review. Global installation also makes the resulting executable available beyond the current Skill invocation and potentially allows a compromised release to affect later sessions. ### Attack Path 1. An attacker compromises the npm account, release pipeline, package dependency, or registry content associated with `add-mcp` or `@getdex/cli`. 2. The attacker publishes a malicious version or changes the version selected by the mutable `latest` tag. 3. A user or agent follows the Skill setup instructions. 4. `npx -y add-mcp ...` downloads and immediately executes the attacker-controlled release, or npm globally installs the compromised CLI. 5. Package installation o ...[truncated 586 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every npm package to an exact reviewed version rather than using an omitted version or `@latest`. 2. Record and verify package integrity hashes or use a lockfile backed by an approved artifact repository. 3. Replace automatic `npx -y` execution with a process that displays the exact package name, resolved version, source, and affected files before requesting explicit approval. 4. Prefer a locally scoped installation over a global installation when the CLI only needs to support this Skill. 5. Audit the selected package and its dependency tree before updating the pinned version. 6. Treat updates as separate security-sensitive operations rather than automatically recommending the mutable latest release. 7. Where practical, distribute a signed, versioned binary and verify its signature or checksum before execution. ]]>
