T03 · Remote Payload Retrieval and Execution
- Location
references/setup.md:10- Finding
Mutable Remote Installer Is Executed Directly by a Shell
- Content
View full analysis
Vulnerability Details
File Location:
references/setup.md:10
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalVulnerable Code
bash curl -sSL https://github.com/longbridge/longbridge-terminal/raw/main/install | shTechnical Analysis
The installation command downloads a shell script from the mutable
mainbranch and immediately passes its contents tosh. It does not pin a commit or release, verify a checksum or cryptographic signature, save the script for inspection, or validate the content before execution.Consequently, the code executed on a user's machine is not necessarily the code that existed when this Skill was reviewed. Hosting the script in the apparent upstream GitHub repository reduces neither the mutability of the resource nor the consequences of a compromised maintainer account, repository, release pipeline, or delivery path.
The command also suppresses normal curl output with
-s, follows redirects with-L, and executes the resulting response regardless of whether the user reviewed it. This behavior is not required for the Skill's declared market-data, SDK, or trading functionality. A package-manager installation or verified release artifact would provide the same functionality with substantially lower risk.Attack Path
- An attacker compromises the upstream repository, a maintainer account, or the process controlling the
main/installresource. - The attacker modifies the installer or redirects it to attacker-controlled shell content.
- A user or AI agent follows the Skill's setup instructions.
curlretrieves the current attacker-controlled response and streams it directly intosh.- The payload executes with all permissions available to the invoking user.
- The payload may read local files and environment variables, access cached Longbridge authentication material, modify user configuration, install additional programs, ...[truncated 787 chars]
- An attacker compromises the upstream repository, a maintainer account, or the process controlling the
- Remediation
View remediation
Remediation Suggestions
- Remove the pipe-to-shell installation method from the recommended setup flow.
- Prefer a trusted package manager and pin an audited release version.
- If a standalone installer is necessary, download a versioned release artifact to disk rather than retrieving it from a mutable branch.
- Publish and verify a SHA-256 digest or, preferably, a cryptographic signature rooted in a separately managed signing key.
- Fail closed if verification does not succeed.
- Allow the user to inspect the downloaded installer before execution.
- Install into a user-owned directory unless system-wide installation is explicitly required and approved.
- Avoid silently invoking privilege escalation; explain any requested privileges and their purpose.
- Document rollback, uninstall, and credential-revocation procedures.
