T08 · Insecure Dependencies
- Location
SKILL.md:10- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10-12
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: Mediumbash npm i -g @kaspacom/defi-mcpTechnical Analysis
The installation instructions retrieve the current release of
@kaspacom/defi-mcpfrom the configured npm registry without specifying an exact version or verifying package integrity. Consequently, the code installed by this command can change after the Skill has been reviewed.npm packages may execute lifecycle scripts during installation. If the package, its publishing account, one of its transitive dependencies, or the configured registry is compromised, malicious code could execute during installation. The
-goption installs the package into the global npm environment, increasing its exposure and potentially replacing or introducing commands available across projects.The dependency's implementation is not included in the audited project, so its runtime behavior and transitive dependency chain could not be verified from the available artifact.
Attack Path
- An attacker compromises the package publisher, npm account, registry path, or a transitive dependency.
- The attacker publishes a malicious release that becomes the version selected by the unpinned installation command.
- A user or agent follows the Skill instructions and runs
npm i -g @kaspacom/defi-mcp. - npm downloads the mutable release and may execute malicious lifecycle scripts during installation.
- The installed global CLI can subsequently execute attacker-controlled logic when invoked for price queries, swaps, or liquidity operations.
Impact Assessment
Malicious installation or runtime code would generally execute with the privileges of the account running npm. It could access files, environment variables, wallet-related configuration, network resources, and credentials available to that account. If the com ...[truncated 398 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specifically reviewed version, for example:
bash npm install --global @kaspacom/defi-mcp@<audited-exact-version> - Prefer a project-local installation with a committed lockfile over a global installation.
- Verify the package's registry provenance, publisher identity, signatures or attestations, and published integrity metadata before installation.
- Audit the selected package release, its lifecycle scripts, and its complete transitive dependency tree.
- Install and run the CLI under a dedicated, least-privileged account or isolated environment.
- Avoid exposing wallet seed phrases or unrestricted signing keys to the process. Use narrowly scoped transaction-signing controls and require explicit confirmation of destination addresses, token identifiers, amounts, slippage, and network before submitting transactions.
- Establish a controlled update process so newer package versions are reviewed before adoption rather than selected automatically.
- Pin the dependency to a specifically reviewed version, for example:
