T03 · Remote Payload Retrieval and Execution
Error
- Location
- skills/cli/references/cli.md:25
- Finding
- Mutable Remote Installer Is Executed Directly Through Bash<![CDATA[ ## Vulnerability Details **File Location**: `skills/cli/references/cli.md:25` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/Nudgen-Marketing/nudgen-cli/main/scripts/install.sh | bash ``` ### Technical Analysis The installation command retrieves a shell script from the mutable `main` branch of an external GitHub repository and streams it directly into Bash. It does not pin the script to a reviewed commit, verify a cryptographic checksum or signature, or provide an opportunity to inspect the downloaded content before execution. The executed script is not included in this project, so its effective behavior cannot be determined by auditing this Skill package. Its contents may also change after the Skill has passed review. Although the URL belongs to the referenced Nudgen organization, repository ownership alone does not provide integrity protection against repository compromise, maintainer-account compromise, DNS/TLS trust failures, or a malicious future commit. This behavior is not required to achieve the Skill's declared CLI functionality. A pinned, separately downloaded, integrity-verified binary or script would provide the same functionality with substantially less supply-chain risk. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or the installation script on the mutable `main` branch. 2. The attacker modifies `scripts/install.sh` to include malicious shell commands. 3. A user or AI agent follows the Skill's documented installation command. 4. `curl` downloads the modified script and streams it directly to Bash. 5. Bash executes the attacker-controlled commands without local review or integrity verification. ### Impact Assessment The remote script receives arbitrary code execution with all privileges of the account running the command. It could read or modify user-accessible files, ste ...[truncated 490 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the pipe-to-shell installation command. 2. Publish versioned releases and pin installation instructions to a specific reviewed release or immutable commit. 3. Download the artifact as a separate step rather than executing streamed network content. 4. Publish SHA-256 checksums or cryptographic signatures through an independently protected release process. 5. Require checksum or signature verification before execution or installation. 6. Prefer a package manager or signed release artifact that provides provenance and integrity validation. 7. Run installation with ordinary user privileges and avoid requesting `sudo` unless a specific destination requires it. 8. If a script must be used, instruct users to save and inspect it first: ```bash curl -fL -o install.sh "https://raw.githubusercontent.com/Nudgen-Marketing/nudgen-cli/<reviewed-commit>/scripts/install.sh" printf '%s %s\n' "<published-sha256>" "install.sh" | sha256sum --check - less install.sh bash install.sh ``` The commit and checksum must be replaced with immutable, publisher-verified values. ]]>
