T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/quick-start.md:10
- Finding
- Mutable Remote Installer Is Executed Directly Through Bash<![CDATA[ ## Vulnerability Details **File Location**: `references/quick-start.md:10` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/sipingme/xiaohongshu-mcp-node-skill/main/install.sh | bash ``` ### Technical Analysis This command downloads `install.sh` from the mutable `main` branch of an external GitHub repository and immediately passes its contents to Bash. The installer is not included in the audited artifact, so its behavior could not be reviewed. The command provides no immutable commit pin, checksum verification, signature validation, or opportunity to inspect the downloaded script before execution. Although GitHub is a recognized hosting provider, hosting on GitHub does not establish the integrity of a repository or protect users if the maintainer account, repository, or referenced branch is compromised. Executing a remote script is not the minimum privilege necessary for the Skill's documented installation. The same guide provides a manual installation procedure, demonstrating that direct remote shell execution is avoidable. ### Attack Path 1. An attacker compromises the repository, maintainer account, or another mechanism capable of changing `install.sh` on the `main` branch. 2. The attacker adds arbitrary shell commands to the installer. 3. A user follows the recommended quick-start command. 4. `curl` retrieves the attacker's current payload without validating its identity or integrity. 5. Bash executes the payload with all privileges available to the invoking user. 6. The payload can access local files, alter configuration, install additional components, or establish persistence subject to those privileges. ### Impact Assessment Successful exploitation results in arbitrary command execution under the account running the installation command. Potentially accessible resources include: - User-owned files and credential ...[truncated 531 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation method and do not describe it as recommended. 2. Prefer the documented manual installation process, allowing users to inspect the checked-out content before execution. 3. If an installer remains necessary: - Include the installer in the audited Skill artifact. - Reference an immutable release or full commit hash rather than `main`. - Publish a SHA-256 digest and a cryptographic signature through an independent trusted channel. - Download the file without executing it, verify its digest and signature, and instruct users to inspect it before running it. 4. Ensure the installer never requires root privileges unless a specific operation demonstrably requires them. 5. Document every file, package, browser component, and configuration entry modified by installation. 6. Provide reproducible release artifacts and protect repository releases with branch protection, signed commits or tags, and maintainer multi-factor authentication. ]]>
