T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:18- Finding
Unverified Remote Installer Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 18
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighComplete Code Snippet:
bash # or: curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | shTechnical Analysis
The installation instructions retrieve a shell script from the mutable
masterbranch of an external GitHub repository and pipe the response directly intosh. This design combines downloading and execution into one operation, preventing routine inspection before execution.The command does not pin the installer to an immutable release tag or commit and does not verify a cryptographic signature or documented checksum. Consequently, the effective payload can change after the Skill has been reviewed. HTTPS protects the connection in transit but does not establish that the current repository content is the same content that was audited.
Installing the
rtkexecutable is relevant to the Skill's declared token-compression functionality. However, executing mutable and unverified network content is not the minimum-risk installation mechanism. A package-manager installation is already documented as the primary alternative and offers a more controlled distribution path.Attack Path
- An attacker compromises the upstream repository, a maintainer account, or another component of the content-delivery trust chain.
- The attacker modifies
install.shon the referencedmasterbranch. - A user or agent follows the alternative installation instruction in
SKILL.md. curlretrieves the current attacker-controlled response.- The pipe sends that response directly to
shwithout integrity verification or prior inspection. - The malicious installer executes with all permissions available to the invoking user.
Impact Assessment
Successful exploitation permits arbitrary command execution under the invoking user ...[truncated 720 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
curl | shinstallation pipeline and retain the documented package-manager installation as the preferred method. - If a standalone installer is necessary, reference an immutable release artifact, signed tag, or full commit identifier rather than the mutable
masterbranch. - Download the artifact to a local file instead of executing streamed network content.
- Publish a SHA-256 checksum through an independently controlled or signed release channel and verify it before execution.
- Prefer cryptographic signature verification using a documented publisher key where supported.
- Allow users to inspect the downloaded script before running it.
- Execute the installer with ordinary user privileges and clearly document any filesystem changes or exceptional permissions it requires.
- Pin the installed
rtkversion so future upstream changes do not silently alter the reviewed behavior.
A safer installation pattern is:
bash curl -fL -o install.sh "https://raw.githubusercontent.com/rtk-ai/rtk/<immutable-commit>/install.sh" printf '%s %s\n' '<documented-sha256>' 'install.sh' | sha256sum -c - less install.sh sh install.sh- Remove the
