T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:17- Finding
Remote Installation Script Executed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 17
Vulnerability Type: Remote code retrieval and immediate shell execution
Risk Level: HighComplete Code Snippet:
bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bashTechnical Analysis
The deployment instructions pipe content downloaded from an external URL directly into Bash. This creates a remote code-execution channel because no local review, cryptographic signature validation, or checksum verification occurs before execution.
The URL refers to the official
nvm-sh/nvmGitHub repository and uses a version tag, which reduces accidental version drift. However, a Git tag does not provide the same assurance as verification against a trusted cryptographic digest or signature. If the repository, referenced tag, hosting account, delivery infrastructure, or retrieved content were compromised, the effective script could execute arbitrary commands before the user could inspect it.Installing NVM is relevant to the declared deployment workflow, but immediate
curl | bashexecution is not the minimum-risk method required to perform that installation.Attack Path
- An attacker compromises the upstream repository, maintainer account, referenced release content, or another component of the delivery chain.
- The remote
install.shcontent is replaced or modified to include an attacker-controlled payload. - A user follows the documented installation command.
curlretrieves the modified content and streams it directly to Bash.- Bash executes the payload with all permissions available to the invoking user.
Impact Assessment
Successful exploitation provides arbitrary command execution under the account running the deployment command. The payload could read or alter files accessible to that account, modify shell configuration, steal local credentials or tokens, install additional user-level component ...[truncated 274 chars]
- Remediation
View remediation
Remediation Suggestions
- Download the installer to a local file instead of piping it directly into a shell.
- Publish and verify a trusted SHA-256 or stronger cryptographic digest before execution.
- Prefer a signed release artifact and validate its signature against a documented maintainer key.
- Review the downloaded script before running it.
- Execute the installer as an unprivileged user and avoid adding
sudo. - Fail safely by enabling strict download options and explicitly checking verification results.
Example hardened workflow:
bash curl --fail --show-error --location \ --output /tmp/nvm-install.sh \ https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh echo '<TRUSTED_SHA256> /tmp/nvm-install.sh' | sha256sum --check - less /tmp/nvm-install.sh bash /tmp/nvm-install.sh rm -f /tmp/nvm-install.shThe expected digest must be obtained through a trusted, independently authenticated source and must not be fetched from the same unverified channel at execution time.
