T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/setup.md:49
- Finding
- Unpinned Remote Installer Is Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `references/setup.md`, lines 49–52 and 195–198 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh -o /tmp/auth0-install.sh echo "⚠️ Review the install script at /tmp/auth0-install.sh before running" sh /tmp/auth0-install.sh -b /usr/local/bin rm /tmp/auth0-install.sh ``` The manual setup section repeats the behavior: ```bash curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh -o /tmp/auth0-install.sh # Review the script before running: cat /tmp/auth0-install.sh sh /tmp/auth0-install.sh rm /tmp/auth0-install.sh ``` ### Technical Analysis The setup instructions download a shell script from the mutable `main` branch of an external repository and execute it without verifying a cryptographic checksum, digital signature, or pinned commit. The reviewed Skill therefore does not contain the effective installation payload; that payload can change after the Skill has been audited. The automated workflow displays a request to review the downloaded script but immediately executes it without pausing for explicit confirmation. Consequently, the message does not enforce a security boundary. The first command installs into `/usr/local/bin`, which is a system-wide location and may require elevated privileges. A system-wide installation exceeds the minimum permissions needed when a user-local installation would be sufficient. ### Attack Path 1. An attacker compromises the upstream repository, maintainer account, release infrastructure, or another part of the delivery path. 2. The attacker modifies `install.sh` on the referenced mutable `main` branch. 3. A user or agent follows the automated setup instructions. 4. `curl` retrieves the changed script without validating its expected digest or signature. 5. `sh` executes the attacker-controlled payload. 6. The p ...[truncated 886 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Prefer an official package manager or signed release artifact instead of executing a branch-hosted installation script. 2. Pin downloads to an immutable release version or full Git commit rather than `main`. 3. Verify a publisher-provided SHA-256 digest or cryptographic signature before execution, and fail closed when verification fails. 4. Separate download and execution into distinct user-approved steps. After download, pause and require explicit confirmation before running the script. 5. Default to a user-owned installation directory such as `$HOME/.local/bin`; request system-wide installation only when the user explicitly requires it. 6. Create temporary files securely with `mktemp`, apply restrictive permissions, and use a cleanup trap. 7. Avoid silent execution. Display the exact source, pinned version, expected digest, destination, and required privileges before proceeding. ]]>
