T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:15- Finding
Unverified Remote Installer Piped Directly into Bash
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 15
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalVulnerable Code
bash curl -fsSL https://raw.githubusercontent.com/LedgiApp/ledgi-cli/main/install.sh | bashTechnical Analysis
The installation instruction downloads
install.shfrom the mutablemainbranch of an external GitHub repository and immediately executes the response with Bash. It provides no commit pinning, cryptographic checksum, signature validation, package-manager provenance, or opportunity to inspect the downloaded file before execution.Installing the Ledgi CLI is relevant to the Skill's declared financial-data functionality. However, executing mutable network content directly exceeds the minimum privileges safely necessary to perform that installation. The effective installer can change after this Skill has been reviewed, and the external installer itself is not included in the audited project. Its behavior, destination API endpoints, filesystem changes, and handling of the
LEDGI_API_KEYtherefore cannot be verified from the available files.This creates a supply-chain execution channel. Control or compromise of the upstream repository, its maintainers' credentials, or the delivery trust path could turn the documented prerequisite into arbitrary code execution.
Attack Path
- An attacker gains control of the upstream
LedgiApp/ledgi-clirepository, a maintainer account, or the mutablemainbranch. - The attacker replaces or modifies
install.shwith a malicious payload. - A user or agent follows the installation instruction in
SKILL.md. curlretrieves the attacker-controlled script without validating its expected content or identity.- The shell executes the response immediately under the invoking user's permissions.
- The payload can access resources available to that user and may attempt further compromise, including theft of credentials or insta ...[truncated 857 chars]
- An attacker gains control of the upstream
- Remediation
View remediation
Remediation Suggestions
- Remove the
curl | bashinstallation pattern. - Prefer installation from a reputable package registry using an explicitly pinned release version.
- If direct download is necessary:
- Pin the download URL to an immutable release artifact or audited commit rather than
main. - Publish an expected SHA-256 or stronger cryptographic digest through a separately protected channel.
- Download the installer to a local file.
- Verify its checksum or trusted digital signature before execution.
- Allow the user to inspect the installer before running it.
- Pin the download URL to an immutable release artifact or audited commit rather than
- Document the installer operations, required permissions, installed paths, network destinations, and uninstall procedure.
- Run installation without elevated privileges unless a specific operation demonstrably requires them.
- Request only the narrow Ledgi API scopes needed for each workflow and avoid exposing the API key through command-line arguments, logs, or installer subprocesses.
- Consider distributing the CLI reproducibly and publishing signed release provenance so users can verify that the artifact corresponds to reviewed source.
A safer pattern would resemble:
bash curl -fSLo ledgi-install.sh \ "https://raw.githubusercontent.com/LedgiApp/ledgi-cli/<AUDITED_COMMIT>/install.sh" echo "<EXPECTED_SHA256> ledgi-install.sh" | sha256sum --check - less ledgi-install.sh bash ledgi-install.shThe commit and checksum must be replaced with independently verified, immutable values.
- Remove the
