T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:31- Finding
Unverified Remote Installation Script Executed Directly by Shell
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 31
Vulnerability Type: Remote mutable payload retrieval and execution
Risk Level: HighComplete Code Snippet:
bash curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bashTechnical Analysis
The installation command downloads a shell script from the mutable
mainbranch of an external GitHub repository and pipes the response directly into Bash. The downloaded content is not pinned to an immutable commit or release and is not verified using a cryptographic signature or documented checksum.Consequently, the code executed by users can differ from the code present when this Skill was audited. Direct piping also removes the opportunity to inspect the complete downloaded file before execution. Although the URL points to the apparent upstream Hermes Agent repository, repository ownership alone does not provide payload immutability or protect against account compromise, malicious upstream changes, repository compromise, or an altered network response.
Installing Hermes Agent may legitimately require obtaining upstream software, but immediate execution of mutable remote content exceeds the minimum mechanism necessary. A pinned, verified artifact can provide the same functionality with substantially lower supply-chain risk.
Attack Path
- An attacker compromises the upstream repository, a maintainer account, or another component capable of changing
main/scripts/install.sh. - The attacker inserts commands into the remote installation script.
- A user follows the Skill documentation and runs the provided command.
curlretrieves the attacker-controlled version and streams it directly to Bash.- Bash executes the payload with the permissions of the invoking user.
- The payload can read or modify user-accessible files, establish user-level persistence, or collect credentials. If the user in ...[truncated 764 chars]
- An attacker compromises the upstream repository, a maintainer account, or another component capable of changing
- Remediation
View remediation
Remediation Suggestions
- Replace the mutable
mainURL with an artifact pinned to a reviewed release or full commit hash. - Download the installer to a local file rather than streaming it directly into a shell:
bash curl -fL -o install.sh \ https://raw.githubusercontent.com/NousResearch/hermes-agent/<FULL_COMMIT_HASH>/scripts/install.sh - Publish and verify an authenticated signature where supported. At minimum, provide a trusted SHA-256 digest and verify it before execution:
bash echo '<EXPECTED_SHA256> install.sh' | sha256sum --check - - Instruct the user to inspect the downloaded script before running it.
- Execute it explicitly and without elevated privileges:
bash bash install.sh - Document the files, network destinations, and configuration changes the installer is expected to create so unexpected behavior can be identified.
- Require restrictive permissions on the secrets file, for example:
bash chmod 600 ~/.hermes/.env - Prefer
FEISHU_GROUP_POLICY=allowlistand disableGATEWAY_ALLOW_ALL_USERSunless unrestricted access is an explicit operational requirement.
- Replace the mutable
