T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/install-acpx.sh:8
- Finding
- Unverified Remote Script Executed with Elevated Privileges<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:21-22` - `scripts/install-acpx.sh:8-11` - `references/claude-code-installation.md:13-16` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: High ### Vulnerable Code ```bash curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs ``` The executable installer repeats the same behavior: ```bash if ! command -v node &> /dev/null; then echo "Installing Node.js..." curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs fi ``` ### Technical Analysis The downloaded response is passed directly to Bash without being saved, inspected, version-pinned, or verified against a trusted cryptographic signature or checksum. The subsequent use of `apt-get` indicates that the instructions or script are expected to run with root-level privileges, particularly in a Docker container. NodeSource is a recognizable provider, but the endpoint serves mutable content. Trust in the current domain owner does not protect against DNS compromise, TLS termination compromise, upstream infrastructure compromise, or an unintended future modification to the remote installer. This behavior exceeds the minimum privilege necessary to install Node.js because safer package installation and verification methods are available. ### Attack Path 1. An attacker compromises the remote endpoint, its delivery infrastructure, DNS resolution, or another component capable of changing the HTTP response. 2. A user or agent follows the Skill instructions or invokes `scripts/install-acpx.sh` in a privileged container. 3. `curl` retrieves the attacker-controlled response. 4. The shell executes that response immediately through the pipe. 5. The payload runs with the invoking user's privileges, potentially root inside the container. 6. The payload can alter package repositories, install additional software, access mounted secrets, or modify ...[truncated 420 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not pipe network responses directly into a shell. 2. Prefer Node.js packages supplied by the operating system or a repository configured through a versioned container image. 3. If the NodeSource installer is required: - Download it to a local file. - Pin the expected installer version or immutable artifact. - Verify a vendor-published cryptographic signature or checksum through an independent trusted channel. - Review the downloaded script before execution. 4. Run repository setup with elevated privileges only for the commands that require them. 5. Pin Node.js and npm package versions rather than installing mutable latest releases. 6. In Docker, install dependencies during a reproducible image-build stage instead of at runtime. ]]>
