T08 · Insecure Dependencies
Error
- Location
- SKILL.md:199
- Finding
- Unpinned Third-Party Dependencies Execute Within a Wallet-Signing Environment<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:199`; `reference/wallet-setup.md:8, 26, 41`; `reference/x402-integration.md:57, 85, 104` **Vulnerability Type**: Unpinned package installation and supply-chain exposure **Risk Level**: High ### Vulnerable Code ```bash # SKILL.md:199 npm install @x402/axios @x402/evm @x402/core ``` ```bash # reference/wallet-setup.md:8,26,41 npm install viem npm install ethers pip install eth-account ``` ```bash # reference/x402-integration.md:57,85,104 npm install @x402/axios @x402/evm @x402/core npm install @x402/fetch @x402/evm pip install x402 ``` ### Technical Analysis The Skill instructs the Agent to install security-sensitive packages without exact version constraints, a lockfile, integrity hashes, or provenance verification. Package registries can consequently resolve mutable releases and transitive dependency versions that were not part of the audited artifact. These dependencies operate in a particularly sensitive context: they generate wallet keys, instantiate EVM signers, submit transactions, and produce x402 payment authorizations. Package installation may also execute package-controlled lifecycle scripts. A compromised release, compromised maintainer account, dependency-confusion event, or malicious transitive dependency could therefore execute code with the same local privileges as the Agent. Installing dependencies is relevant to the declared functionality, but accepting arbitrary future versions exceeds the minimum capability necessary to implement it safely. ### Attack Path 1. An Agent follows one of the unpinned `npm install` or `pip install` instructions. 2. The package manager resolves a compromised or unexpectedly modified direct or transitive package. 3. Malicious code executes during installation, import, or wallet/payment operations. 4. The package reads `EVM_PRIVATE_KEY`, intercepts a generated key, modifies a transaction destination, or changes an x402 payment authorization. 5. T ...[truncated 956 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a reviewed exact version rather than a range or latest release. 2. Commit reviewed lockfiles and replace ordinary installation with reproducible commands such as `npm ci`. 3. Use integrity verification and a trusted registry configuration. 4. For Python, provide a hash-locked requirements file and install with `pip install --require-hashes -r requirements.txt`. 5. Review transitive dependencies and package lifecycle scripts before allowing installation in a signing environment. 6. Separate dependency installation from wallet use. Install and inspect dependencies in an isolated build environment, then run signing operations in a restricted runtime. 7. Avoid exposing wallet secrets to install processes, build hooks, or unrelated dependencies. 8. Document supported package versions and establish a controlled process for reviewing upgrades. ]]>
