T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:20- Finding
Unpinned Remote Installer Executed Directly Through a Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:20-24
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighComplete Code Snippet:
markdown 1. Check CLI: - `command -v statichub` - `statichub --help` - If missing, install with one line: - `curl -sSL https://raw.githubusercontent.com/Patrick0308/statichub/main/scripts/install.sh | sh`Technical Analysis
The Skill instructs the agent to retrieve an installation script from a personal GitHub repository's mutable
mainbranch and pipe it directly intosh. The downloaded content is therefore executed before it can be reviewed.The instruction does not pin the script to a reviewed commit or release and does not verify a cryptographic checksum or signature. Consequently, the effective installer can change after this Skill has been audited. Compromise of the repository, maintainer account, or upstream delivery process could substitute arbitrary shell commands. The
-soption also suppresses normal curl progress and error output, reducing visibility during installation.Installing the required CLI can support the declared deployment functionality, but immediate execution of mutable remote content is not the least-risk or minimum-privilege installation method.
Attack Path
- The agent checks for
statichuband determines that it is absent. - Following
SKILL.md, it requests the installer from the repository's mutablemainbranch. - An attacker who controls or compromises the repository, maintainer account, or upstream content replaces the installer with malicious shell commands.
- The pipeline sends the response directly to
shwithout local inspection, version pinning, checksum validation, or signature verification. - The malicious commands execute with the privileges of the user or agent running the Skill.
Impact Assessment
Successful exploitation permits arbitrary command execution under the invoking user's privileges. D ...[truncated 389 chars]
- The agent checks for
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | shpipeline. - Prefer installation from a trusted package manager using an explicitly pinned version.
- If a standalone installer is required:
- Pin its URL to a reviewed immutable commit or release artifact.
- Download it to a local file without executing it.
- Verify a publisher-provided cryptographic checksum and, preferably, a trusted digital signature.
- Review the downloaded script and disclose the commands and filesystem changes it will perform.
- Require explicit user approval before execution.
- Run installation with ordinary user privileges and avoid
sudounless a documented operation strictly requires it. - Fail closed on download or verification errors; use curl options such as
--fail --show-error --location. - Document the expected binary destination, files modified, network endpoints contacted, and uninstall procedure.
A safer general workflow is:
sh curl --fail --show-error --location \ --output /tmp/statichub-install.sh \ 'https://raw.githubusercontent.com/Patrick0308/statichub/<reviewed-commit>/scripts/install.sh' printf '%s %s\n' '<trusted-sha256>' '/tmp/statichub-install.sh' | sha256sum --check - sh /tmp/statichub-install.shThe immutable commit and checksum must come from a separately authenticated, trusted source.
- Remove the direct
