T03 · Remote Payload Retrieval and Execution
- Location
- wallets.md:91
- Finding
- Unverified Remote Installer Is Executed Directly<![CDATA[ ## Vulnerability Details **File Location**: `wallets.md:91` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" ``` ### Technical Analysis The documented installation command retrieves mutable shell content from an external server and immediately passes it to `sh`. It does not pin a release, validate a checksum, verify a cryptographic signature, or provide an opportunity to inspect the downloaded script. The effective code executed on the local system can therefore change after the Skill package has been reviewed. HTTPS protects transport under normal conditions, but it does not protect against compromise of the remote server, its deployment pipeline, its domain or certificate infrastructure, or the upstream installer itself. This command is particularly sensitive because the installation occurs in an environment that may contain Bags JWTs, API keys, exported Solana private keys, and transaction-signing components. ### Attack Path 1. An attacker compromises the remote installer host, deployment pipeline, domain, or another component capable of changing the response. 2. The installer response is replaced with malicious shell commands. 3. A user or Agent follows the installation instructions in `wallets.md`. 4. `curl` downloads the attacker-controlled response. 5. Command substitution inserts the response into `sh -c`. 6. The payload executes with the privileges of the user running the Skill. 7. The payload can inspect local credentials, replace signing code, steal wallet keys, or establish additional persistence. ### Impact Assessment Successful exploitation provides arbitrary code execution under the invoking user's account. The payload could access: - `~/.config/bags/credentials.json` - Exported Solana private keys and keypair files - Bags JWT and API credentials - Local Agent configuration and Skill instructions - F ...[truncated 198 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Do not pipe or interpolate network responses directly into a shell. - Download a specific, immutable release artifact to a temporary location. - Pin the expected release version rather than using `stable`. - Verify a publisher signature and a separately distributed SHA-256 or stronger checksum. - Display or review the installer before execution. - Run installation in an isolated, unprivileged environment without wallet credentials. - Document the exact expected artifact URL, hash, signer identity, and verification commands. ]]>
