T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Unverified Remote Installer Executed Directly by Bash## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Complete Code Snippet**: ```sh # Install (no Node.js required) curl -fsSL https://artifact.lx.netease.com/download/youdaonote-cli/install.sh | bash ``` ### Technical Analysis The installation instruction downloads a shell script from an external URL and streams it directly into Bash. The payload is executed immediately without being saved for inspection and without version pinning, checksum validation, or cryptographic signature verification. Although installing the YoudaoNote CLI supports the Skill's declared functionality, direct execution of a mutable remote script is not the least-privileged or least-trust installation method. The reviewed project does not establish the endpoint's authenticity beyond HTTPS, nor does it constrain what the remote installer may do. HTTPS protects data in transit under normal conditions but does not protect against compromise of the hosting service, malicious changes by an authorized publisher, or failures in the DNS and certificate trust chain. The effective executable payload can change after this Skill has been reviewed. Consequently, the behavior and privileges of the installer cannot be determined from the repository itself. ### Attack Path 1. A user or agent follows the setup instructions in `SKILL.md`. 2. The shell requests `install.sh` from the external endpoint. 3. The endpoint, publishing account, hosting infrastructure, DNS resolution, or TLS trust chain is compromised or serves an altered script. 4. `curl` streams the attacker-controlled response directly to Bash. 5. Bash executes the response with the privileges of the invoking user before the user can inspect or verify it. 6. The payload may access user-readable files and credentials, alter shell configuration, replace local executables, download additional payloads, or e ...[truncated 1158 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the `curl | bash` pipeline with a staged installation process that downloads the artifact without executing it: ```sh curl -fL -o youdaonote-install.sh \ https://artifact.lx.netease.com/download/youdaonote-cli/install.sh ``` 2. Publish a versioned, immutable installer URL rather than a mutable `install.sh` endpoint. 3. Publish the expected SHA-256 digest through an independently protected release channel and require verification before execution: ```sh echo "EXPECTED_SHA256 youdaonote-install.sh" | sha256sum --check - ``` 4. Prefer cryptographic release signatures with documented verification keys and key-rotation procedures. 5. Instruct users to inspect the downloaded script before running it, then execute it as a separate command only after successful verification. 6. Prefer a trusted package manager or a signed, version-pinned binary distribution where available. 7. Document all files, directories, network destinations, and configuration entries created by the installer. 8. Explicitly state that installation should occur without administrative privileges unless a narrowly defined operation requires them. 9. Avoid printing or otherwise exposing the configured API key, and store it using restrictive permissions or an operating-system credential store. 10. Provide reproducible release metadata so users can independently confirm that the downloaded artifact corresponds to audited source code.
