T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:21- Finding
Mutable Remote Installer Is Downloaded and Executed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:21,SKILL.md:234,SKILL.md:254;README.md:42,README.md:156-157
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighComplete Vulnerable Code Snippets:
bash curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | shbash curl --proto '=https' --tlsv1.2 -LsSf --connect-timeout 30 --max-time 300 https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | shTechnical Analysis
The installation instructions stream a remotely retrieved shell script directly into
sh. Because the URL uses the mutablelatestrelease path, the effective code executed by the command can change after this Skill has been reviewed.HTTPS and the specified TLS settings protect the network transport, but they do not establish that the downloaded installer is the exact artifact that was previously audited. The instructions do not pin an immutable release, verify a cryptographic signature, or compare the installer against a trusted checksum before execution.
GitHub and the referenced NEAR repository are plausible upstream sources, but this does not eliminate risks from repository takeover, maintainer credential compromise, malicious release publication, CI/CD compromise, or replacement of a release asset. Piping directly to a shell also prevents a normal review step before execution.
Direct execution is not the minimum privilege or minimum-risk operation necessary to provide installation guidance. The installer can instead be downloaded as a regular file, verified, inspected, and then executed explicitly under an unprivileged account.
Attack Path
- An attacker compromises an upstream maintainer account, repository release workflow, or release publishing token.
- The attacker publishes or replaces the installer referenced by the mu ...[truncated 1073 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove every direct
curl | shinstallation example. - Pin installation instructions to a specific, reviewed release rather than the mutable
latestpath. - Download the installer to a local file without executing it:
bash curl --proto '=https' --tlsv1.2 -fL \ -o near-cli-rs-installer.sh \ https://github.com/near/near-cli-rs/releases/download/<pinned-version>/near-cli-rs-installer.sh - Obtain the expected SHA-256 digest or cryptographic signature through a trusted, publisher-controlled channel.
- Verify the artifact before execution:
bash printf '%s %s\n' '<trusted-sha256>' 'near-cli-rs-installer.sh' | sha256sum --check - - Encourage users to inspect the downloaded script before running it.
- Execute the verified installer explicitly and as an unprivileged account:
bash sh ./near-cli-rs-installer.sh - Document the files and configuration that the installer is expected to modify.
- Prefer a package-manager installation with a pinned version and integrity metadata when a trusted package is available.
- Remove every direct
