T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:59
- Finding
- Mutable Remote Shell Script Is Downloaded and Executed Without Verification<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 59–66 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash ### One-liner bash installer ```bash # Detects platform automatically bash <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/cypress-agent-skill/main/install.sh) # Or with explicit agent bash <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/cypress-agent-skill/main/install.sh) --agent open-claw ``` ``` ### Technical Analysis The documented installation commands use shell process substitution to retrieve content from an external URL and pass it directly to `bash`. The payload is taken from a mutable `main` branch, is not pinned to an immutable commit, and is not protected by a checksum or cryptographic signature. The referenced `install.sh` is not present in the audited artifact, despite being listed in the README repository structure. Consequently, its behavior cannot be statically reviewed. The effective payload may also change after this Skill has been reviewed. The `YOUR_USERNAME` placeholder does not remove the vulnerability. If users replace it as instructed, or if a distributed version contains a valid account, whoever controls that repository can alter the script subsequently. Direct repository-cloning instructions are already provided, so immediate execution of a remotely hosted installer is not necessary for the Skill’s stated Cypress documentation functionality. ### Attack Path 1. A user substitutes a repository owner for `YOUR_USERNAME` and runs the documented command. 2. `curl` retrieves the current `install.sh` from the mutable `main` branch. 3. Shell process substitution supplies the downloaded content directly to `bash`. 4. A malicious repository owner, compromised account, or attacker with repository write access modifies `install.sh`. 5. The modified script executes under the installing user’s account without prior inspect ...[truncated 910 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `bash <(curl ...)` installation method and retain the documented `git clone` or trusted registry installation methods. 2. Add `install.sh` to the audited repository if an installer is genuinely required. 3. Instruct users to download and inspect the script before running it rather than executing network content directly. 4. Pin downloads to an immutable reviewed commit instead of `main`. 5. Publish a SHA-256 digest or cryptographic signature through an independent trusted channel and verify it before execution. 6. Ensure the installer operates without elevated privileges and limits writes to the selected Skill directory. 7. Add automated release controls that verify the installer included in a release is byte-for-byte identical to the reviewed source. A safer pattern would be: ```bash curl -fL -o install.sh \ https://raw.githubusercontent.com/OWNER/cypress-agent-skill/IMMUTABLE_COMMIT/install.sh echo "EXPECTED_SHA256 install.sh" | sha256sum --check - less install.sh bash install.sh --agent open-claw ``` The immutable commit and expected digest must be replaced with reviewed, trusted values. ]]>
