T08 · Insecure Dependencies
Error
- Location
- SKILL.md:168
- Finding
- Unpinned Third-Party SDK Is Given Access to a Funded Wallet Key## Vulnerability Details **File Location**: `SKILL.md`, lines 27 and 168–170 **Vulnerability Type**: Supply-chain exposure of sensitive wallet credentials **Risk Level**: High ### Vulnerable Code ```bash npm install @aureus-arena/sdk @solana/web3.js ``` ```typescript const secret = JSON.parse(fs.readFileSync("./wallet.json", "utf8")); const wallet = Keypair.fromSecretKey(Uint8Array.from(secret)); const client = new AureusClient(connection, wallet); ``` ### Technical Analysis The instructions install `@aureus-arena/sdk` and `@solana/web3.js` without exact version pins or package-integrity constraints. The resulting SDK client is then initialized with a `Keypair` derived from the complete secret key of a funded Solana wallet. A `Keypair` provides unrestricted signing authority for the corresponding wallet. Any code executing in the same Node.js process can potentially access the key object or request signatures. Because the SDK implementation is not included in the audited project, its treatment of the key cannot be verified from `SKILL.md`. The reviewed file does not directly transmit the raw secret key and does not prove that the current SDK is malicious. The vulnerability is the high-impact trust boundary created by giving mutable, unaudited dependency code access to a valuable signing credential. ### Attack Path 1. An operator follows the documented installation command without an existing integrity-locked dependency tree. 2. A compromised, malicious, or unexpectedly modified package version is retrieved from the package registry. 3. The bot reads the complete funded-wallet secret from `wallet.json`. 4. The secret-derived `Keypair` is passed to dependency-controlled SDK code. 5. Malicious dependency code accesses signing authority, constructs unauthorized transactions, or exports key material. 6. The attacker transfers assets or continues signing transactions until the wallet is depleted or the credential ...[truncated 545 chars]
- Remediation
- ## Remediation Suggestions - Pin every dependency to an audited exact version rather than relying on floating package versions. - Commit and enforce a package lockfile, and use reproducible installation such as `npm ci`. - Verify package provenance, integrity hashes, maintainers, release history, and the source corresponding to the installed artifact. - Audit or vendor the Aureus SDK before allowing it to interact with a funded wallet. - Use a dedicated game wallet with only the minimum necessary balance; never use a treasury or primary wallet. - Isolate signing behind a hardware wallet, remote signer, or policy-enforcing signing service that validates program IDs, recipient accounts, instruction types, and spending limits. - Restrict filesystem permissions on `wallet.json`, exclude it from source control and backups where appropriate, and avoid storing raw secret-key arrays in the project directory. - Rotate the wallet key immediately if dependency compromise or unauthorized key access is suspected.
