T03 · Remote Payload Retrieval and Execution
- Location
scripts/self_check.py:126- Finding
Unverified Remote Installer Recommended for Direct Shell Execution
- Content
View full analysis
Vulnerability Details
File Location:
scripts/self_check.py:126
Vulnerability Type: Remote payload retrieval and execution
Risk Level: Mediumpython result.add_issue("nvm 不可用", "安装 nvm: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash", "warning")Technical Analysis
The self-check report recommends downloading an installation script from an external URL and piping it directly into
bash. This pattern executes the response before the user can inspect it and provides no checksum, cryptographic-signature, or content verification.The referenced URL belongs to the expected
nvm-sh/nvmGitHub repository and is pinned to versionv0.39.0, rather than an apparent personal paste site. Nevertheless, direct remote-to-shell execution remains unsafe: compromise of the upstream repository, hosting account, release reference, delivery infrastructure, or local trust chain could cause arbitrary shell commands to run.The Python script only prints this command as remediation advice; it does not download or execute the installer automatically. Exploitation therefore requires a user to follow the generated recommendation manually. Even with this limitation, presenting the command as the standard fix creates a credible social execution path and is unnecessary for the Skill's declared read-only diagnostic function.
Attack Path
- The self-check determines that
nvmis unavailable. - It displays the
curl ... | bashcommand as a recommended repair. - The user trusts the diagnostic report and manually executes the command.
curlretrieves the current response from the external hosting service.bashimmediately executes that response without integrity verification or prior review.- If the retrieved content has been maliciously modified, it runs arbitrary commands with the invoking user's privileges.
Impact Assessment
A compromised payload would obtain the p ...[truncated 553 chars]
- The self-check determines that
- Remediation
View remediation
Remediation Suggestions
- Remove the
curl | bashrecommendation. - Prefer installation through a trusted operating-system package manager where a maintained package is available.
- If upstream installation is required, instruct the user to download a version-pinned installer to a local file without executing it:
bash curl --fail --proto '=https' --tlsv1.2 \ --output install-nvm.sh \ https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh - Verify the downloaded file against an independently published cryptographic checksum or signature. Do not obtain both the artifact and its integrity value solely through the same untrusted delivery path.
- Require the user to inspect the local script before execution.
- Execute it only after explicit confirmation and with an unprivileged account:
bash bash install-nvm.sh - Consider recommending the latest supported, security-reviewed nvm release rather than the old
v0.39.0installer, while retaining an immutable version pin and documented integrity value. - Keep the Skill read-only: it should continue reporting missing dependencies without automatically downloading, installing, or modifying anything.
- Remove the
