T08 · Insecure Dependencies
Error
- Location
- SKILL.md:15
- Finding
- Unpinned Third-Party CLI Is Installed and Given Access to Sensitive Wallet Material## Vulnerability Details **File Location**: `SKILL.md`, lines 15-17 and 25-29 **Vulnerability Type**: Unpinned and mutable third-party dependency with access to secrets **Risk Level**: High **Vulnerable Code**: ```bash which clawdex || npm install -g clawdex@latest ``` ```bash clawdex onboarding \ --jupiter-api-key "$JUPITER_API_KEY" \ --rpc "${SOLANA_RPC_URL:-https://api.mainnet-beta.solana.com}" \ --wallet ~/.config/solana/id.json \ --json ``` ### Technical Analysis The skill instructs the agent to globally install `clawdex@latest`. The `latest` npm tag is mutable, so the installed implementation can change after the skill has been reviewed. No exact version, integrity hash, package provenance check, publisher verification, or package-content validation is required. npm installation may also execute package lifecycle scripts. After installation, the resulting executable is configured with a Jupiter API key, an RPC endpoint, and the path to a Solana wallet key file. A compromised or malicious package release could therefore run code under the invoking user's account and access sensitive wallet or API material. The use of `which clawdex` does not establish that an existing executable is authentic. A spoofed executable earlier in `PATH` could also satisfy the check and receive the sensitive onboarding arguments. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or the mutable `latest` release. 2. The agent runs `npm install -g clawdex@latest`. 3. Malicious package lifecycle code or the installed CLI executes with the permissions of the invoking user. 4. The agent invokes onboarding with the Jupiter API key and wallet key-file path. 5. The malicious CLI reads or exfiltrates accessible credentials and wallet material, or alters subsequent transaction behavior. 6. The attacker uses the exposed material or manipulated signer to perform unauthorized activity. An alte ...[truncated 832 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to a specifically reviewed version instead of using `@latest`. - Verify npm provenance, publisher identity, package signatures where available, and the expected package integrity hash before installation. - Prefer a lockfile-controlled local installation over a global installation. - Install and execute the CLI in an isolated environment with minimal filesystem and network permissions. - Disable npm lifecycle scripts during installation where compatible, then separately review any required setup behavior. - Resolve and validate the executable's absolute path rather than trusting `PATH` lookup alone. - Verify the executable or package checksum before passing any sensitive configuration. - Use a dedicated, low-value trading wallet with strictly limited funds rather than a primary wallet. - Prefer a hardware wallet, external signer, or narrowly scoped signing service so the CLI never receives direct access to a private-key file. - Restrict API credentials to the minimum permissions required and rotate them if exposure is suspected. - Document a reviewed upgrade process so dependency updates trigger a new security assessment.
