T03 · Remote Payload Retrieval and Execution
- Location
references/troubleshooting.md:53- Finding
Unverified Remote Installation Scripts Are Piped Directly into Shells
- Content
View full analysis
Vulnerability Details
File Location:
references/installation.md:172;references/troubleshooting.md:53,79
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code
references/installation.md:172:bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashreferences/troubleshooting.md:53:bash curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -references/troubleshooting.md:79:bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashTechnical Analysis
These instructions download shell programs from external services and immediately execute the received content without signature verification, checksum validation, or local inspection. The effective code can therefore change after the Skill has been reviewed.
The NVM URL refers to a versioned path on the project's GitHub repository, which reduces accidental version drift, but the downloaded content is still executed without cryptographic verification. Compromise of the repository, maintainer account, hosting infrastructure, TLS trust chain, or local network trust configuration could replace the response.
The NodeSource command has a greater impact because it pipes the response into
sudo -E bash. This executes the remote response with root privileges while preserving selected caller environment state. Installing Node.js is ancillary setup and does not require an image-export Skill to retrieve and directly execute mutable privileged shell code.Attack Path
- An attacker compromises an upstream repository, account, CDN, DNS route, or other delivery component.
- The attacker modifies the remote response to include malicious shell commands.
- A user follows the installation or troubleshooting documentation.
curlwrites the attacker-controlled response directly tobash.- The NVM payload ...[truncated 903 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all
curl | bashandcurl | sudo bashinstallation instructions. - Prefer Node.js packages supplied by the operating system or a documented package manager with repository signature validation.
- If an upstream installer must be used:
- Pin an immutable release and exact artifact.
- Download it to a local file.
- Verify a maintainer-published cryptographic signature or pinned SHA-256 digest.
- Inspect the script before execution.
- Run it without
sudounless a reviewed operation specifically requires elevation.
- Do not preserve the calling environment when elevating privileges unless each retained variable is necessary and validated.
- Document the expected artifact digest and trusted signing key.
- Separate optional environment setup from the core diagram-export workflow.
- Remove all
