T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:98- Finding
Execution of an Unpinned Mutable Remote Shell Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:98,README.md:30, andREADME-CN.md:29
Vulnerability Type: Remote payload retrieval and immediate shell execution
Risk Level: CriticalComplete Code Snippet:
bash # Method 2 / Method 2 equivalent: Shell script installation curl -fsSL https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.sh | bashTechnical Analysis
The installation command retrieves a shell script from the mutable
mainbranch of an external GitHub repository and pipes the response directly intobash. The downloaded payload is not included in the audited project, pinned to an immutable commit, verified against a cryptographic checksum, or authenticated with a release signature.Consequently, the effective code executed by this Skill can change after the Skill itself has been reviewed. The GitHub namespace appears consistent with the declared vendor, but the identity, current security posture, and future contents of the external repository cannot be established from this project alone.
Piping network output directly into a shell also removes the normal inspection boundary between download and execution. Any code returned by the URL receives the same operating-system privileges as the user or agent running the command. This execution capability exceeds the minimum privilege necessary to document or install the invoice-recognition client because a pinned, verified package or binary could provide the declared functionality without immediately trusting mutable remote content.
Attack Path
- An attacker compromises the external repository, its maintainer account, a publishing workflow, or another mechanism capable of modifying
scripts/adp-init.shon themainbranch. - The attacker inserts arbitrary shell commands into the remotely hosted installation script.
- A user or AI agent follows the installation instructions in
SKILL.md,README.md, or `REA ...[truncated 1024 chars]
- An attacker compromises the external repository, its maintainer account, a publishing workflow, or another mechanism capable of modifying
- Remediation
View remediation
Remediation Suggestions
- Remove the direct
curl | bashinstallation pipeline from all affected documentation. - Publish versioned installation scripts or release artifacts and reference an immutable release tag or commit rather than
main. - Download the artifact to a local file before execution:
bash curl -fL -o adp-init.sh https://example.invalid/releases/vX.Y.Z/adp-init.sh - Publish a SHA-256 or stronger checksum through a separately protected release channel and verify it before execution:
bash echo "EXPECTED_SHA256 adp-init.sh" | sha256sum --check - - Prefer cryptographic release signatures with documented key-verification procedures.
- Allow the user to inspect the downloaded script and require explicit confirmation before running it:
bash less adp-init.sh bash adp-init.sh - Do not recommend running the installer as
rootor throughsudounless a specific operation demonstrably requires elevation. - Pin the installer and resulting CLI version, and document all files, network endpoints, and permissions used by the installation process.
- Remove the direct
