T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:125- Finding
Remote NVM Installer Is Downloaded and Executed Without Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 125
Vulnerability Type: Remote payload retrieval and immediate shell execution
Risk Level: HighVulnerable Code
bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashTechnical Analysis
The instruction streams a remote installation script directly into Bash. The downloaded content is not saved for inspection, and its checksum, digital signature, and provenance are not verified before execution. It also omits fail-closed curl options such as
--fail,--show-error, and--location.Although the URL points to the established
nvm-sh/nvmGitHub repository and specifies a version tag, that does not eliminate the remote-code-execution risk. A Git tag is not equivalent to a locally verified immutable digest. The effective payload remains outside the audited Skill and could change or be compromised after this review.Installing NVM may be relevant as an alternative to unsafe system-wide npm permissions, but immediate
curl | bashexecution is not the minimum privilege or safest mechanism necessary for installation diagnostics.Attack Path
- An attacker compromises the referenced repository, release tag, maintainer account, hosting infrastructure, or another part of the remote delivery chain.
- The attacker changes the content returned for
install.shor causes malicious content to be served from the expected URL. - A user follows the Skill's permission-error remediation instructions.
curlstreams the unverified response directly to Bash.- Bash executes the attacker's commands with the privileges of the invoking user.
- The payload can access user files, credentials, development environments, and shell configuration, or establish user-level persistence.
Impact Assessment
Successful exploitation provides arbitrary command execution under the invoking user's account. This can expose or modify files readable or writable by tha ...[truncated 476 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not pipe network responses directly into a shell.
- Pin the installer to an immutable, reviewed commit rather than relying only on a version tag.
- Download the installer to a newly created local file using fail-closed transport options.
- Verify a trusted SHA-256 digest or cryptographic signature obtained through an independent trusted channel.
- Review the downloaded script before execution and require explicit user confirmation.
- Run the installer as an unprivileged user and document the files it is expected to modify.
- Prefer an operating-system package manager or other verifiable installation mechanism where available.
A safer pattern is:
bash curl --fail --show-error --location \ --output /tmp/nvm-install.sh \ "https://raw.githubusercontent.com/nvm-sh/nvm/<immutable-commit>/install.sh" printf '%s %s\n' '<trusted-sha256>' '/tmp/nvm-install.sh' | sha256sum --check less /tmp/nvm-install.sh bash /tmp/nvm-install.shThe digest and immutable commit must come from a trusted, independently verified source. A temporary file should also be created securely and removed after use.
