T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:17
- Finding
- Unpinned Remote Shell Script Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/lp-agent/scripts/check_prerequisites.sh) ``` ### Technical Analysis The prerequisite instructions download a shell script from a mutable GitHub branch and pass the response directly to Bash through process substitution. The command does not pin the remote resource to an immutable commit, verify a cryptographic checksum or signature, or allow the user to inspect the downloaded content before execution. Consequently, the effective code executed by the Skill can change after the local package has been reviewed. Compromise of the upstream repository, maintainer account, branch, or content-delivery path could replace the prerequisite script with arbitrary commands. This behavior is not required to implement the declared arbitrage-scanning functionality. A local, audited prerequisite checker—or instructions that perform explicit checks without remote code execution—would provide the necessary functionality with substantially less privilege and supply-chain exposure. ### Attack Path 1. An attacker compromises the upstream repository, maintainer account, or mutable branch containing `check_prerequisites.sh`. 2. The attacker modifies the remote script to include malicious shell commands. 3. A user follows the documented prerequisite command. 4. `curl` retrieves the attacker-controlled content without integrity verification. 5. Bash immediately executes the content with the permissions of the user running the command. 6. The payload can access files and credentials available to that user, modify local state, invoke network services, or install additional payloads. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking user's account. The accessible scope i ...[truncated 245 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Bundle the prerequisite checker inside the reviewed Skill package and execute the local copy. - If remote retrieval is unavoidable, pin the URL to an immutable commit and verify a separately trusted SHA-256 checksum or digital signature before execution. - Download the file as data, inspect and validate it, and only then execute it; do not pipe or process-substitute remote content directly into a shell. - Use `curl --fail --show-error --location` so network and HTTP failures are handled explicitly, but do not treat these options as substitutes for integrity verification. - Restrict the checker to read-only prerequisite validation and document every permission and external resource it needs. ]]>
