T03 · Remote Payload Retrieval and Execution
Error
- Location
- install.sh:3
- Finding
- Unverified Remote Payload Retrieval and Persistent Cross-Agent Installation<![CDATA[ ## Vulnerability Details **File Location**: `install.sh`, lines 3-21 **Vulnerability Type**: Remote payload retrieval and persistent installation **Risk Level**: High ### Vulnerable Code ```bash # 用法:bash install.sh 或 curl -sSL https://selltoai.ai/skills/install.sh | bash set -euo pipefail SRC_URL="${MORAS_SHOP_SKILL_URL:-https://selltoai.ai/skills/moras-shop/SKILL.md}" DEST_DIRS=( "$HOME/.cursor/skills/moras-shop" "$HOME/.claude/skills/moras-shop" "$HOME/.codex/skills/moras-shop" "$HOME/.openclaw/skills/moras-shop" ) echo "[moras-shop] downloading SKILL.md from $SRC_URL ..." TMP=$(mktemp) curl -fsSL "$SRC_URL" -o "$TMP" for d in "${DEST_DIRS[@]}"; do mkdir -p "$d" cp "$TMP" "$d/SKILL.md" echo "[moras-shop] installed → $d/SKILL.md" done rm -f "$TMP" echo "[moras-shop] done. Restart your agent to pick it up." ``` ### Technical Analysis The documented `curl -sSL ... | bash` installation method directly executes a mutable remote shell script without allowing the user to review it and without verifying a cryptographic signature, pinned digest, or immutable release identifier. If the remote endpoint or its delivery chain is compromised, the installer can run arbitrary shell commands with all privileges of the invoking user. The installer then performs a second mutable download of `SKILL.md`. The source can also be changed through the inherited `MORAS_SHOP_SKILL_URL` environment variable. The downloaded file is not validated before being copied into the persistent Skill directories of Cursor, Claude, Codex, and OpenClaw. Although installing a Skill is the script's declared purpose, writing an unverified remote instruction payload into four separate Agent environments exceeds the minimum necessary scope. It expands the compromise from one selected host to every listed host and causes the payload to remain active across sessions. The use of `mktemp` and quoted variables avoids common temporary-file and shell word-splitting flaws. Th ...[truncated 1696 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation recommendation. Require users to download and inspect a versioned installer before executing it. 2. Publish immutable, versioned releases rather than retrieving a mutable `SKILL.md` path. 3. Publish a SHA-256 or stronger digest through a separately protected channel and verify it before installation. 4. Prefer cryptographic release signatures with a pinned public key over checksums hosted beside the payload. 5. Validate `MORAS_SHOP_SKILL_URL` against an explicit HTTPS origin allowlist, or remove the override unless custom sources are essential. 6. Fail closed if signature, digest, TLS, or origin validation fails. 7. Ask the user which Agent should receive the Skill instead of installing into all supported Agent directories by default. 8. Display the resolved source, version, digest, and destination and require confirmation before modifying persistent Agent configuration. 9. Use a cleanup trap so temporary files are removed if the download or copy operation fails. ]]>
