T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/anchor.js:126
- Finding
- Unpinned Remote Installer Piped Directly into Bash<![CDATA[ ## Vulnerability Details **File Location**: `scripts/anchor.js:126-129` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```js const cast = hasCast(); if (!cast) { console.log('\n⚠️ Foundry cast not found. Install: curl -L https://foundry.paradigm.xyz | bash && foundryup'); return; } ``` ### Technical Analysis When Foundry is unavailable, the Skill recommends downloading a mutable remote response and piping it directly into Bash. The command does not pin a version, verify a checksum, validate a digital signature, or give the user an opportunity to inspect the downloaded script. Although the JavaScript only prints the instruction rather than executing it automatically, the instruction is part of the Skill's runtime workflow and encourages a user or Agent to create a remote code-execution channel. HTTPS protects transport integrity but does not make the returned artifact immutable or protect against compromise of the remote distribution infrastructure. This behavior is not necessary for the Skill's declared memory-management functionality. A locally installed, verified blockchain client could instead be treated as an explicit prerequisite. ### Attack Path 1. A user or Agent invokes `scripts/anchor.js` without Foundry installed. 2. The Skill displays the `curl ... | bash` installation command. 3. The user or Agent executes the suggested command. 4. The remote server, its distribution account, DNS path, or delivery infrastructure serves altered content. 5. Bash executes that content immediately with the invoking user's privileges. ### Impact Assessment A compromised response can execute arbitrary local commands, read Agent memory and wallet configuration, steal credentials, modify persistent workspace files, install additional persistence, or take control of the invoking account. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove all pipe-to-shell installation instructions. - Direct users to a pinned Foundry release from an official release page. - Download the release artifact to disk before execution. - Verify a published cryptographic checksum and, where available, a maintainer signature. - Display the exact version and source to the user and require explicit approval. - Prefer a documented prerequisite check that exits safely instead of installing software during the Skill workflow. ]]>
