T08 · Insecure Dependencies
Error
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party Dependencies Used for Privileged Wallet Operations<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17-21`, `SKILL.md:94-102` **Vulnerability Type**: Unpinned third-party npm dependencies **Risk Level**: High ### Vulnerable Code ```bash npm install agentwallet-sdk ``` ```markdown Current version: **v2.4.1** on npm (158 tests passing, 0 compile errors) ``` ```bash npm install @agent-wallet/mastra-plugin ``` ```bash npm install clawpay-mcp ``` ### Technical Analysis The documented installation commands resolve mutable npm package versions without exact version constraints or integrity verification. Although the documentation identifies `agentwallet-sdk` version `v2.4.1`, the installation command does not pin that version. The Mastra plugin and ClawPay MCP package are also installed without pinned versions. This is particularly sensitive because the packages are intended to interact with private signing keys and perform autonomous wallet operations, including transfers, swaps, cross-chain bridging, HTTP payments, and identity registration. The project contains only documentation and metadata; it does not include the dependency source code, a lockfile, or integrity hashes that would permit reproducible verification of the installed implementation. The finding does not establish that any named package is currently malicious. The vulnerability is that following the instructions trusts whichever package release and transitive dependency graph the npm registry resolves at installation time. ### Attack Path 1. An attacker compromises a package publisher account, npm package, or relevant transitive dependency. 2. The attacker publishes a modified version containing malicious installation or runtime behavior. 3. A user follows the documented unpinned `npm install` command. 4. npm resolves the attacker-controlled release because no exact reviewed version or integrity constraint is specified. 5. The installed dependency executes through an installation script or when the agent invokes wallet or MCP ...[truncated 1080 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin each reviewed dependency to an exact version, without range operators: ```bash npm install --save-exact agentwallet-sdk@2.4.1 npm install --save-exact @agent-wallet/mastra-plugin@REVIEWED_VERSION npm install --save-exact clawpay-mcp@REVIEWED_VERSION ``` 2. Commit a generated lockfile containing registry-resolved integrity hashes, and use `npm ci` in automated or reproducible installations. 3. Review the source and published package contents for every pinned release, including lifecycle scripts and transitive dependencies. 4. Disable npm lifecycle scripts where they are unnecessary: ```bash npm ci --ignore-scripts ``` 5. Add automated dependency monitoring, provenance checks, vulnerability scanning, and an explicit approval process before updating pinned versions. 6. Run wallet components with least privilege and isolate them from unrelated credentials, files, and network resources. 7. Apply wallet-level safeguards, including destination and contract allowlists, per-transaction and cumulative spending limits, narrowly scoped session keys, transaction simulation, slippage limits, chain-ID validation, and explicit approval for high-value operations. 8. Clarify that the Skill metadata version `1.0.0` and the documented SDK version `2.4.1` represent separate artifacts, preventing users from confusing the reviewed Skill version with the installed dependency version. ]]>
