T08 · Insecure Dependencies
- Location
rules/getting-started.md:3- Finding
Unpinned Third-Party CLI Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
rules/getting-started.md:3-7(also referenced inSKILL.md:31-35andSKILL.md:123-126)
Vulnerability Type: Unverified and unpinned npm dependency execution
Risk Level: HighVulnerable code snippet:
markdown ## Setup 1. **Install the agentcash CLI:** ```bash npm install -g agentcash ```The Skill subsequently invokes the same unpinned package through commands such as:
bash npx agentcash wallet infoTechnical Analysis
The setup instructions globally install the
agentcashnpm package without specifying an exact version, package integrity hash, lockfile, or verification procedure. Subsequentnpx agentcashcommands also rely on npm package resolution. Depending on the local npm environment,npxmay retrieve package code if a suitable local installation is unavailable.npm package installation can execute lifecycle scripts under the current user's privileges. Consequently, compromise of the package publisher, npm registry account, distribution process, or a future package release could cause code that was not included in this audited project to execute locally.
This risk is particularly significant because the documented CLI manages a cryptocurrency wallet stored at
~/.agentcash/wallet.jsonand signs USDC payments. The external package implementation is not included in the audited project, so its handling of wallet material and payment authorization could not be verified.Attack Path
- An attacker compromises the package publisher, registry account, or package distribution process.
- The attacker publishes a malicious release under the unversioned
agentcashpackage name. - A user follows the Skill's instructions and runs
npm install -g agentcash, or invokes annpx agentcashcommand in an environment where npm retrieves the package. - npm installs or executes the attacker-controlled package, including a ...[truncated 983 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specifically audited version, for example by using an exact version rather than an unconstrained package name.
- Publish the expected package source repository, release provenance, and cryptographic integrity information through a trusted channel.
- Verify package integrity and publisher identity before installation.
- Avoid global installation where possible. Install the dependency in an isolated project or restricted execution environment with a committed lockfile.
- Disable unnecessary npm lifecycle scripts during installation where compatible with the package's documented operation.
- Run wallet tooling under a dedicated, least-privileged account or sandbox that cannot access unrelated user files and credentials.
- Require explicit user review of the destination, amount, network, and asset before signing each payment.
- Document a tested upgrade process so newer package versions are reviewed before the pinned version is changed.
