T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:134
- Finding
- Unverified Remote Scripts Are Downloaded and Executed Directly<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 134-143 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash # End-to-end setup with MCP auto-configuration /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/PayRam/payram-scripts/main/setup_payram_agents.sh)" ``` ```bash # Standard self-hosted deployment /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/PayRam/payram-scripts/main/setup_payram.sh)" ``` ### Technical Analysis The Skill instructs users or agents to retrieve shell scripts from the mutable `main` branch of an external GitHub repository and execute the downloaded content immediately with Bash. This `curl | bash` pattern provides no opportunity to inspect the effective payload before execution. It also lacks: - Pinning to an immutable commit or release artifact - Cryptographic signature verification - Checksum validation - Validation of redirects or final download origin - A documented inventory of filesystem and configuration changes - An explicit restriction against elevated execution Because the referenced branch can change after the Skill has been reviewed, the effective executable payload is not contained within the audited project. Compromise of the repository, its maintainers, GitHub account credentials, or the delivery path could consequently alter the commands executed by users. The agent installer is described as performing “MCP auto-configuration,” indicating that it may modify local configuration in addition to installing PayRam. Those effects exceed the minimum privileges required for the Skill's declared payment-gateway comparison function. ### Attack Path 1. A user asks the agent to compare payment gateways or set up PayRam. 2. The Skill presents one of the remote shell commands as an installation method. 3. The user or agent invokes the command, potentially from an account with broad local permissions. 4. Bash obtains th ...[truncated 1182 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all direct `curl | bash` installation instructions. 2. Publish versioned, immutable release artifacts and reference a specific release and commit. 3. Download the installer to a local file without executing it automatically. 4. Publish a SHA-256 or stronger checksum through an independently protected channel and verify it before execution. 5. Cryptographically sign release artifacts and require signature verification against a documented maintainer key. 6. Display the downloaded script for review and require separate, explicit user approval before execution. 7. Document every expected filesystem, package, network, account, service, and configuration change. 8. Ensure the installer refuses unnecessary root execution and performs unprivileged operations wherever possible. 9. Separate MCP configuration from product installation and require independent consent for each. 10. Prefer reproducible packages or container images with pinned digests and a published software bill of materials. ]]>
